From: shugo@... Date: 2017-12-25T12:34:29+00:00 Subject: [ruby-dev:50390] [Ruby trunk Bug#14232] Unused refinement still breaks method search Issue #14232 has been reported by shugo (Shugo Maeda). ---------------------------------------- Bug #14232: Unused refinement still breaks method search https://bugs.ruby-lang.org/issues/14232 * Author: shugo (Shugo Maeda) * Status: Assigned * Priority: Normal * Assignee: shugo (Shugo Maeda) * Target version: * ruby -v: * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- Given the following t.rb: ``` module A def foo puts "A#foo" super end end class B def foo puts "B#foo" end end class C < B include A def foo puts "C#foo" super end end module D refine A do def foo end end end C.new.foo ``` Even if D is not used, B#foo cannot be called by super in A#foo: ``` $ ruby t.rb C#foo A#foo Traceback (most recent call last): 2: from t.rb:30:in `
' 1: from t.rb:19:in `foo' t.rb:4:in `foo': super: no superclass method `foo' for # (NoMethodError) ``` -- https://bugs.ruby-lang.org/