Method: Memory::Cache#lookup_string

Defined in:
lib/memory/cache.rb

#lookup_string(obj) ⇒ Object



55
56
57
58
59
60
# File 'lib/memory/cache.rb', line 55

def lookup_string(obj)
	# This string is shortened to 200 characters which is what the string report shows
	# The string report can still list unique strings longer than 200 characters
	#   separately because the object_id of the shortened string will be different
	@string_cache[obj] ||= String.new << obj[0, 64]
end