Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

ObjectSpace::WeakKeyMap#inspect

() -> ::String
map.inspect → new_string

Returns a new String containing informations about the map:

Example
m = ObjectSpace::WeakKeyMap.new
m[key] = value
m.inspect # => "#<ObjectSpace::WeakKeyMap:0x00000001028dcba8 size=1>"
See also #getkey #key? #delete also in 4.1 · 4.0 · 3.3