From: mark Date: 2003-08-23T02:52:55+09:00 Subject: Re: [ANN] Ruth 0.10 On Friday 22 Aug 2003 3:38 pm, Robert Feldt wrote: > ts skrev den Fri, 22 Aug 2003 23:20:34 +0900: > > I've not understood > > svg% ruby -riis -e 'puts dump; def m(a) 1 end' > > puts(dump) > > def m(a) > > 1 > > end > > svg% I was able to re-build `def m' > > Yes, this is from an older version of ruth. Maybe it had > a bug back then or I didn't understand it. Now it works: > > feldt@novomundo1 /tmp/development/ruth/trunk > $ ruby tests/parse_ruby_file.rb 'def m(a); 1; end' > Def > :m > [:a] > IntegerLiteral > 1 However if you try something like [mark@laptop ruth-0.10]$ ruby tests/parse_ruby_file.rb 'def m(a); x=1; end' Def :m [:a, :x] LocalAssign :x IntegerLiteral 1 So it seems that the array [:a, :x] is a list of all local variables used in the function. Is there any way to find out what parameters the function takes? > Regards, > > Robert Best Regards Mark Sparshatt