From: "rosenfeld (Rodrigo Rosenfeld Rosas)" Date: 2012-05-21T21:08:56+09:00 Subject: [ruby-core:45168] [ruby-trunk - Feature #6452] Allow extend to override class methods Issue #6452 has been updated by rosenfeld (Rodrigo Rosenfeld Rosas). Yeah, sorry I should have thought about this before. You're right, for normal usage the current behavior is more useful indeed. I was willing to patch a class from a third-party library, that is why I wanted my module method to take precedence. Would you consider to add a new method for such case? And an equivalent one for include as well? Should I open a new ticket and close this one? ---------------------------------------- Feature #6452: Allow extend to override class methods https://bugs.ruby-lang.org/issues/6452#change-26744 Author: rosenfeld (Rodrigo Rosenfeld Rosas) Status: Assigned Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: Target version: 3.0 ``` module A def self.a 'a1' end end module B def a 'a2' end def b 'b' end end A.extend B assert A.a == 'a2' # this is the change I'm proposing - currently it is 'a1' assert A.b == 'b' ``` Would this change be possible for 3.0? -- http://bugs.ruby-lang.org/