- Status changed from Feedback to Closed
I think this is a duplicate of #18285.
Since Ruby 3.0.0, an error message of UndefinedMethod always includes all instance variables. As this could be too long as you said, it is reconsidered in #18285.
$ ./bin/ruby-2.7.6 -e 'class Foo; def initialize; @aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1; end; end; Foo.new.boo'
Traceback (most recent call last):
-e:1:in `<main>': undefined method `boo' for #<Foo:0x000055f12b8e94b0> (NoMethodError)
$ ./bin/ruby-3.0.0 -e 'class Foo; def initialize; @aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1; end; end; Foo.new.boo'
-e:1:in `<main>': undefined method `boo' for #<Foo:0x0000559d6e0b5de0 @aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=1> (NoMethodError)