path: root/parse.y
diff options
authorJeremy Evans <>2020-12-22 21:30:32 -0800
committerJeremy Evans <>2020-12-23 19:29:19 -0800
commit1e215a66d26d56befab4fbb72e1d953879411955 (patch)
tree1633af4390f554711ca04b50566f544d84ee9f9e /parse.y
parent9aca51e8a597fb4689c058b4e6b215ae87434e1b (diff)
Fix class of method in Method#inspect for singleton classes of classes
Previously, due to a change to fix bug 15608, Method#inspect output changed for class methods: Ruby 2.7 "#<Method: String.prepend(*)>" Before change: "#<Method: #<Class:Object>(Module)#prepend(*)>" This is wrong because the Method object was created from String and not Object. This is because the fix for bug 15608 assumed it was being called on the singleton class of a instance, and would skip the first singleton class until it got to the class itself. For class methods, this results in always using the superclass. Fix behavior to not skip until the superclass if the singleton class is the singleton class of a module or class. After change: "#<Method: #<Class:Object>(Module)#prepend(*)>" Fixes [Bug #17428]
Notes: Merged:
Diffstat (limited to 'parse.y')
0 files changed, 0 insertions, 0 deletions