From: marcandre-ruby-core@... Date: 2020-12-23T15:31:27+00:00 Subject: [ruby-core:101650] [Ruby master Bug#17428] Method#inspect bad output for class methods Issue #17428 has been updated by marcandre (Marc-Andre Lafortune). Eregon (Benoit Daloze) wrote in #note-3: > ``` > # > ``` > doesn't seem correct, prepend is not a class method of `Module`, it's an instance method. When `(X)` appears, it means `actually an instance method of X`, even in the case where `.` appears later. So not incorrect, but I agree it might be confusing. How about this other possibility? ``` # ``` ---------------------------------------- Bug #17428: Method#inspect bad output for class methods https://bugs.ruby-lang.org/issues/17428#change-89440 * Author: marcandre (Marc-Andre Lafortune) * Status: Open * Priority: Normal * Assignee: jeremyevans0 (Jeremy Evans) * ruby -v: ruby 3.0.0dev (2020-12-22T17:37:59Z master 487355873a) [x86_64-darwin18] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- ``` $ $ ruby -e 'p String.method(:prepend)' # 2.7.0: # # 3.0.0: #(Module)#prepend(*)> ``` @jeremyevans found it shows the method as pertaining to one level too high (which is good for objects as we don't want to show the singleton class there, but not for classes). Probably due to #15608 -- https://bugs.ruby-lang.org/ Unsubscribe: