Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

ObjectSpace::WeakKeyMap#inspect

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

Returns a new String containing information 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.0 · 3.4 · 3.3