From: Roger Pack Date: 2008-07-15T14:21:15+09:00 Subject: Re: Proc argument names instead of arity > var func = { |arg1, arg2| arg1 + arg2 } > => a Function > var def = func.def > => a FunctionDef - closed > def.argumentNames > => [arg1, arg2] > > Is there any way of doing this with ruby? Appears that there is. ~ sudo gem install ParseTree >> class A; def go(b); end; end >> args = ParseTree.translate(A, :go)[2][1][1] => [:args, :b] Only works with MRI. Been using it recently for an auto named variable generator. GL. -R -- Posted via http://www.ruby-forum.com/.