From: Yukihiro Matsumoto Date: 2011-12-12T06:06:58+09:00 Subject: [ruby-core:41596] Re: [ruby-trunk - Bug #5746][Open] Proc#curry too strict about lambda's arity. Hi, In message "Re: [ruby-core:41594] [ruby-trunk - Bug #5746][Open] Proc#curry too strict about lambda's arity." on Mon, 12 Dec 2011 02:08:08 +0900, Marc-Andre Lafortune writes: |Currently, Proc#curry raises an error when you attempt to curry a lambda with optional (but limited) arguments: | | l = ->(arg = 42) {} | l.curry(1) # => ArgumentError: wrong number of arguments (1 for 0) In my opinion, #curry should not rely on #arity at all. Even after proposed fix, it accepts l.curry(3) which is wrong. It should use more reliable information such as #parameters. matz.