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.1 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-3.0.0 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.25 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.24 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.23 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.22 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.21 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.20 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.19 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.18 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.17 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.16 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.15 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.14 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.13 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.12 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.4 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.2 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.1 lib/eco/api/common/version_patches/ruby3/object.rb
eco-helpers-2.7.0 lib/eco/api/common/version_patches/ruby3/object.rb