[Ruby2c] 2 new blog entries (and 2 questions at the end)
Ryan Davis
ryand-ruby at zenspider.com
Mon Feb 7 11:52:03 PST 2005
On Feb 7, 2005, at 1:48 AM, mark sparshatt wrote:
> These don't seem to do the same thing, though. If keepgoing returns
> false the first time it's called then the first version prints "this
> is a weird loop" and calls doSomethingWeird twice, while the second
> one only does it once.
You are totally correct. When refax was originally written ParseTree
had a bug where it didn't say whether it was a pre-conditioned or
post-conditioned while/until loop. Now it does, but I haven't released
the change yet. Should be trivial once Rudi has the new code (but not
trivial for me since his code is fairly opaque).
> That aside being able to query a method for it's source does seem to
> be a very good thing(TM). It seems the next step would be to
> dynamically modify that source.
*nod* Since ParseTree can't write back into the method dictionary, it
seems like ruby2ruby and an eval is the next best route.
--
ryand-ruby at zenspider.com - Seattle.rb -
http://www.zenspider.com/seattle.rb
http://blog.zenspider.com/ - http://rubyforge.org/projects/ruby2c
More information about the ruby2c
mailing list