From: Phlip Date: 2010-09-07T08:40:32+09:00 Subject: Re: Wrong: an introspecting assert library On Sep 3, 2:28 pm, Ryan Davis wrote: > On Sep 3, 2010, at 13:42 , Alex Chaffee wrote: > > > So how do we do it? Doesn't Ruby have poor support for AST > > introspection (see > >http://blog.zenspider.com/2009/04/parsetree-eol.html)?Well, yes, it > > does, so we cheat: we figure out what file and line the assert block > > is defined in, then open the file, read the code, and parse it > > directly using Ryan Davis' amazing RubyParser and Ruby2Ruby. You can > > bask in the kludge by examining `chunk.rb` and `assert.rb`. If you > > find some code it can't parse, please send it our way. > > HAHAHA!... you SICK SICK BASTARDS.... HAHAHAHA! > > good work! Ahem. My version doesn't need to rip the source... C-: