From: merch-redmine@... Date: 2019-10-02T22:24:51+00:00 Subject: [ruby-core:95192] [Ruby master Bug#15629] super_method fails on binded/unbinded/cloned methods Issue #15629 has been updated by jeremyevans0 (Jeremy Evans). File super_method-bind-unbind-clone-15629.patch added This bug is due to the fact that bind/unbind/clone do not copy the `iclass` entry, and without an `iclass` entry, `super_method` returns `nil`. Attached is a patch that fixes this issue. ---------------------------------------- Bug #15629: super_method fails on binded/unbinded/cloned methods https://bugs.ruby-lang.org/issues/15629#change-81866 * Author: wanabe (_ wanabe) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- derived from #13973: ``` module A def foo end end module B def foo end end class C include A include B end c = C.new m1 = c.method(:foo) p m1.super_method # => # p m1.clone.super_method # => nil p m1.unbind.super_method # => nil m2 = C.instance_method(:foo) p m2.super_method # => # p m2.clone.super_method # => nil p m2.bind(c).super_method # => nil ``` `super_method` of binded/unbinded/cloned method should be `super_method` of original method, shouldn't it? ---Files-------------------------------- super_method-bind-unbind-clone-15629.patch (4.85 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: