class Object # From ruby3 # `NameError` prints the internals of the object as well as subobjects # which is really unnecessary # @example # class Foo; attr_writer :bar; end # foo = Foo.new # foo2 = Foo.new # foo.bar = foo2 # h = {a: 1, b: 2, c: foo} # foo2.bar = h # h.foo # #=> undefined method `foo' for {:a=>1, :b=>2, :c=>#>}:Hash (NoMethodError) # What's the use of such a detail when it's just a missing method at the top of it? def inspect to_s end end