From: Hiroshi Nakamura Date: 2011-06-28T06:20:22+09:00 Subject: [ruby-core:37586] [Ruby 1.9 - Feature #4254] Allow method transplanting Issue #4254 has been updated by Hiroshi Nakamura. Target version changed from 1.9.3 to 1.9.x ---------------------------------------- Feature #4254: Allow method transplanting http://redmine.ruby-lang.org/issues/4254 Author: Jonas Pfenniger Status: Open Priority: Normal Assignee: Category: core Target version: 1.9.x =begin Is there a technical reason to not allow re-binding a method from one module to any other module ? module M def foo; "foo"; end end module N; end N.send(:define_method, :foo, M.instance_method(:foo)) #=> should not raise It's like monkey-patching. Powerful, dangerous, but also really useful. It could allow different variations of method_wrap or alias_method_chain that are not possible right now. =end -- http://redmine.ruby-lang.org