From: Charles Oliver Nutter Date: 2011-01-10T05:33:10+09:00 Subject: [ruby-core:34278] Re: [Ruby 1.9-Feature#4254][Open] Allow method transplanting On Sun, Jan 9, 2011 at 1:53 PM, Loren Segal wrote: > FWIW I've implemented something similar a while back as a gem called > "force_bind". You call .force_bind on an UnboundMethod instead of bind. > > https://rubygems.org/gems/force_bind > > Although it would be great to see #bind (and define_method) support this out > of the box, adding this behaviour through a gem isn't *so* bad. JRuby has shipped this feature since 2006 or so, called JRubyExtensions.steal_method(target, source, :name). We originally did it because we needed only some methods from ActiveRecord on our hacked adapters around JDBC. I'm unsure if it's used anymore. - Charlie