From: Juston Davies Date: 2009-07-08T04:11:29+09:00 Subject: Re: A define_method question That'll do, after looking at the doc looks like you an .to_proc a method object. Thanks for the help! On Jul 7, 1:06 pm, Joel VanderWerf wrote: > Juston Davies wrote: > > Is there any other way to take a method from another object and store it > > into a proc or lambda object? > > Yes. The result isn't a proc/lambda, but it is callable. > > s = "foo" > m = s.method :reverse > m2 = m.unbind > > s2 = "bar" > m3 = m2.bind(s2) > puts m3.call # ==> rab > > See docs for Method and UnboundMethod. > > -- >        vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407