From: Macario Ortega Date: 2009-08-09T07:01:26+09:00 Subject: Re: Kind of ParsTree for 1.9.1 Hi Roger. nice to read you. I've allready done that with our named arguments gem but I wan't to have AST for live objects. The project is going dormant for a while (allthough is not gonna die) because lack of time but I found great advice in this thread: Having a tight and organized set of tests and recycling tests from other proyects such as PT and checking other proyects that work with bytecode. Cheers Macario Roger Pack wrote: > Kevin Rutherford wrote: >> Hi Macario, >> >>> Does anyone else craves AST manipulation in 1.9.1 as bad as me? >> >> Reek (http://github.com/kevinrutherford/reek/tree) will miss ParseTree >> in 1.9 too, because it means that some of its Rspec matchers no longer >> work. Without ParseTree (or equivalent) it's not possible to write: >> >> MyClass.should_not reek > > You can still pull the code for a method using #source_location [though > it's definitely not as nice as using parse tree was, and not as stable]. > > A crude example of extracting a method can be found in the method > describer gem [1]. > > What problems are you running up against exactly? Learning lessons from > python decompyle might be helpful, too. > I also remember that Paul Brannan had some type of iseq -> c translator, > that might be related. > GL! > > -r > [1] http://github.com/rogerdpack/method_describer/tree/master -- Posted via http://www.ruby-forum.com/.