Hallo Pit, > Thank you for the example. Lets see if I understand what you're doing: > you have a given Ruby code (the learning extractor) and need to > manipulate it according to certain rules to create a modified version of > the code (the generalized extractor). Exactly! > Well, in your example it looks like you use nothing but the Scrubyt DSL. > In this case you could capture the calling sequence and the method > arguments when you execute the DSL. But if you want to allow normal Ruby > code in the #define block (loops, conditionals, etc), then I can't think > of other solutions. Yes, we are just adding this possibility (so you can do branching etc. with native Ruby code - a DSL is fine but it always has its limits, whereas Ruby doesn't :-) - so in the long run we have to do this (or something equally powerful). > If I really wanted to support Windows users, Yeah, we surely do! A lot of them are using scRUBYt!, too... > I'd try to compile > ParseTree with MinGW and/or convince the maintainers to provide a binary > version of the gem :-) Well, I don't really understand why aren't they doing this anyway, since their windows users have the same trouble as we do (actually we have it just because of ParseTree). This is a viable alternative if others do not work out (mainly the next paragraph). ATM one team member is working on a solution called ParseTreeReloaded which will wrap pure Ruby code around ParseTree so no C compiling will be needed. ATM ParseTreeReloaded can already parse its own source code so I guess he's making some great progress... Let's see. > But my question wasn't meant as a recommendation not to use ParseTree. > I'm simply interested in use cases for working with the Ruby AST. Yeah sure, I am also in the don't-drop-parsetree camp... however if we can not solve this problem permanently under windows (which I am 99% positive we can) I'll have to look for a different solutions because of the win32 ppl... Cheers, Peter __ http://www.rubyrailways.com :: Ruby and Web2.0 blog http://scrubyt.org :: Ruby web scraping framework http://rubykitchensink.ca/ :: The indexed archive of all things Ruby.