summaryrefslogtreecommitdiff
path: root/test/ruby/test_inlinecache.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2025-11-22 19:51:46 -0800
committerJeremy Evans <code@jeremyevans.net>2025-12-10 07:35:50 +0900
commit76fb0d244b95a23116bfe72bb2422395c3a76477 (patch)
tree3a4c0d1fc7b600b8ca017e8b382829f679fd6a6d /test/ruby/test_inlinecache.rb
parent1e7cf7b2bc1f9b356b2e980e1e18548618da6363 (diff)
Use actual class instead of singleton class in frozen error message
With the following code: ```ruby object = [] object.singleton_class object.freeze object.instance_variable_set(:@a, 42) ``` The previous error message was: ``` can't modify frozen #<Class:#<Array:0x00000631d1308f78>>: [] ``` With this change, the error message is: ``` can't modify frozen Array: [] ``` Since we show the inspect value of the affected object, I think including the singleton class instead of the actual class if it exists makes the error message harder to understand.
Diffstat (limited to 'test/ruby/test_inlinecache.rb')
0 files changed, 0 insertions, 0 deletions