Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
PP::PPMethods#object_address_group
(untyped obj) { () -> untyped } -> ::Integer
object_address_group(obj, &block)
lib/pp.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/pp.rb, line 228
def object_address_group(obj, &block)
str = Kernel.instance_method(:to_s).bind_call(obj)
str.chomp!('>')
group(1, str, '>', &block)
end
A convenience method, like object_group, but also reformats the Object’s object_id.
See also
#guard_inspect_key
#object_group
#comma_breakable
#pop_inspect_key
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0