From: Dan Doel Date: 2003-12-15T20:05:41+09:00 Subject: Re: Arity? #arity seems to have been changed since that was written. Seems to me it does this: if #arity is negative (n < 0) the minimum number of required parameters is (n + 1).abs proc {|*a|}.arity #=> -1, can be called with 0 or more args proc {|a,*b|}.arity #=> -2, can be called with 1 or more args In the above, calling with 0 or 1 args respectively means a and b respectively are []. If #arity is positive or 0, the number of formal parameters is exactly n. proc {|a|}.arity #=> 1 proc {||}.arity #=> 0 proc {|a,b|}.arity #=> 2 Trying to pass a number of arguments other than n will be an error except in the case of 1, where the arguments will be collected into an array and placed in the one parameter. However, methods of one parameter can only be called with one argument (making them different in this regard from methods). proc {}.arity #=> -1 This is because you can pass in any number of arguments and they'll be ignored. To specify 0 params and only 0 params, you need ||. I think that's every possibility. If I've missed something let me know. I'm working with Ruby version 1.8.0 ms-win32 build. - Dan