Benoit Daloze wrote: > "no receiver given" : That means it knows it has a argument to act on > like > a.+(b). How come ? > Would &:+ knows it need some object to act with "+"(o) ? a + b is syntactic sugar for a.+(b), or a.send(:+,b) - you can see that you have one receiver, and one argument. If you google "symbol to_proc" you'll find some 1.8 implementations. The first hit I get is PragDave's blog where he shows this code: class Symbol def to_proc proc { |obj, *args| obj.send(self, *args) } end end > Well, that's strange: arity = -1, so normally only optional arguments. And > it expects 1 argument but want 2 ? You can see why that is from the implementation above. The method call must have a receiver (obj), but we know how many other arguments to take, so it accepts zero or more. It passes them all as arguments to the method, whose name is the symbol itself. -- Posted via http://www.ruby-forum.com/.