From: Roger Pack Date: 2009-08-09T00:57:02+09:00 Subject: Re: Kind of ParsTree for 1.9.1 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/.