Sha256: 5695fdb6d52b81edca1a0a8827858508c307715558a950d4132f5e6fc5af0453

Contents?: true

Size: 608 Bytes

Versions: 44

Compression:

Stored size: 608 Bytes

Contents

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=>#<Foo:0x000002343276b520 @bar=#<Foo:0x0000023437e91ca0 @bar={...}>>}: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

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
eco-helpers-3.0.21 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.20 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.19 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.18 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.17 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.16 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.15 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.14 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.13 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.12 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.11 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.10 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.9 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.8 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.7 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.6 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.5 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.4 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.3 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.2 lib/eco/api/common/version_patches/ruby3/object.rb