(2011/12/04 12:41), NARUSE, Yui wrote:
> (2011/12/03 4:20), Yehuda Katz wrote:
>> Yeah¡Ä it would be nice to be able to do:
>>
>>   if proc.arity_range.include?(2)
>>   if method.arity_range.include?(2)
> 
> Is it really required way?
> 
> For example you want to know whether you can obj.meth(a, b) or not,
> it should be something like obj.callable?(:meth, a, b), shouldn't it?

After some consideration, I'm wondering why following code is not used.
There is already a method or proc object in usual use case?

begin
  obj.__send__(callback, attributes)
rescue ArgumentError
  obj.__send__(callback)
end

-- 
NARUSE, Yui  <naruse / airemix.jp>