Issue #11672 has been reported by Akira Tanaka. ---------------------------------------- Bug #11672: refinement https://bugs.ruby-lang.org/issues/11672 * Author: Akira Tanaka * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0dev (2015-11-10 trunk 52511) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- I found following script behaves different between ruby 2.2.3 and trunk. Is this difference intentional? ``` % cat tst.rb class C end module R refine C do def m puts :foo end end end using R C.new.m module R refine C do def m puts :bar end end end C.new.m % ./ruby -wv tst.rb ruby 2.3.0dev (2015-11-10 trunk 52511) [x86_64-linux] foo foo % ruby-2.2.3 -wv tst.rb ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux] foo tst.rb:17: warning: method redefined; discarding old m tst.rb:6: warning: previous definition of m was here bar ``` -- https://bugs.ruby-lang.org/