From: usa@... Date: 2015-02-25T06:02:21+00:00 Subject: [ruby-dev:48883] [Ruby trunk - Bug #10826] Refinements make instance_methods(false) return methods of superclasses Issue #10826 has been updated by Usaku NAKAMURA. Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE ruby_2_0_0 r49738 merged revision(s) 49222,49480,49493. ---------------------------------------- Bug #10826: Refinements make instance_methods(false) return methods of superclasses https://bugs.ruby-lang.org/issues/10826#change-51656 * Author: Shugo Maeda * Status: Closed * Priority: Normal * Assignee: Shugo Maeda * ruby -v: ruby 2.3.0dev (2015-02-04 trunk 49489) [x86_64-linux] * Backport: 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE ---------------------------------------- If a method is refined for a subclass X of the owner of the method, X.instance_methods(false) returns that method even if it's not defined in X. ```ruby class X def foo end end class Y < X end module Bar refine Y do def foo end end end p Y.instance_methods(false).include?(:foo) # false expected, but true is returned ``` -- https://bugs.ruby-lang.org/