Method#arity problem

hi

lets say I have this code:

def get_arity©
puts c.new.method(‘meth’).arity
end

get_arity(Kernel)

this does not work because when passing different classes
"new" might expect a different number of arguments and I get an error

how can I get the arity of methods from a class when I do not know
how many arguments “new” expects ?

markus

irb(main):001:0> Kernel.instance_method(:putc).arity
1

···

On Thu, Oct 17, 2002 at 07:24:55AM +0900, Markus Jais wrote:

how can I get the arity of methods from a class when I do not know
how many arguments “new” expects ?