From: Lin Jen-Shin Date: 2008-03-01T19:43:23+09:00 Subject: Proc#curry doesn't work on func which produces func Proc#curry doesn't work on function which produces function, as a result, Proc#curry doesn't work on Symbol#to_proc. The problem is, the produced function is not a curried function. e.g., :+.to_proc.curry[1][2] would fail, because :+.to_proc is producing a function which arity equals to -1. Then the curry thing wouldn't work properly. We know the arity of a binary addition function is 2. I don't know if there's a best way to solve this problem. We can't create a function which has the right arity because we won't know the receiver of the message. My implementation of Proc#curry just solved this problem simply by re-currying (not recursively) it again whenever the arity equaled to -1 and the ArgumentError was raised. I thought this was a bad implementation, but I couldn't find a better way to solve this problem until now. Perhaps there's better way in C implementation? The source code of my impl of Proc#curry was here: http://ludy.rubyforge.org/classes/Proc.html#M000045 Thanks for your listening.