Jeff Mitchell wrote:
> I would like to get the arity of a method.  However, arity is a method
> of Method, and I can only get a Method from the method method of Object
> (phew!).
> 
> So it appears impossible to get the arity of a method in a class
> without making an instance of that class.  Is this true?

Not in 1.8, where you can get an UnboundedMethod using instance_method:

String.instance_method(:replace).arity #=>  1
String.instance_method(:gsub).arity    #=> -1

-- 
(\[ Kent Dahl ]/)_    _~_    _____[ http://www.pvv.org/~kentda/ ]_____/~
  ))\_student_/((  \__d L b__/ (pre-) Master of Science in Technology  )
( \__\_?|?_/__/ ) _)Industrial economics and technological management(
  \____/_?_\____/ (____engineering.discipline_=_Computer::Technology___)