From: ts Date: 2006-04-20T00:00:28+09:00 Subject: Re: understanding the behavior of Method#to_proc >>>>> "E" == Eli Bendersky writes: E> plus_proc = plus.to_proc E> p plus_proc.call(10) # prints 10 E> Is unclear... E> 1) How does it work ? not like you think :-) moulon% ruby -e 'p 2.method("+").to_proc.call(10)' 12 moulon% E> 4) Have the 'bind' and 'unbind' methods of Method / UnboundMethod E> anything in common with Proc#binding or the Binding class ? well #bind associate a Binding with an UnboundMethod E> 5) Have Proc#binding and the Binding class anything in common ? How E> about Kernel#binding ? moulon% ruby -e 'p = proc { }; p p.binding.class' Binding moulon% moulon% ruby -e 'p binding.class' Binding moulon% E> Additionally, the following, IMHO demostrates a very surprising and E> unnatural behavior of to_proc: good question :-) Guy Decoux