From: Eli Bendersky Date: 2006-04-20T02:19:41+09:00 Subject: Re: understanding the behavior of Method#to_proc Yukihiro Matsumoto wrote: > Hi, > > In message "Re: understanding the behavior of Method#to_proc" > on Wed, 19 Apr 2006 23:25:34 +0900, Eli Bendersky > writes: > > |plus = 12.method("+") > |p plus.call(13) # prints 25 > > |plus_proc = plus.to_proc > |p plus_proc.call(10) # prints 10 > > Which version of Ruby are you using? My 1.8.4 gives me 22. > > matz. You are right, I made a mistake. It prints 22 for me too. Still, I don't quite understand what does it mean for a Proc to be bound to an object ? Does it have some access to the object's internals, like the method did ? When is this useful ? Thanks -- Posted via http://www.ruby-forum.com/.