From: Roger Pack Date: 2007-11-09T18:22:50+09:00 Subject: Re: [ ruby-Bugs-15425 ] Leak with regexp in method with no local vars. It appears that when you have def a ''.whatever # note the lack of variables used EVER end it parses it as a node without a var table (makes sense--no vars). Then when you get to eval.c:5922 there's no table to the code body, ruby_scope->local_tbl is set to nil. Then when regex tries to save something (which it does for every search), it says 'what there's no var space? I'll create my own' (well kind of -- calls special_local_set('~', val); which as far as I can tell allocated memory and never frees it, since it's a temporary memory outside of the normal stack so POP_STACK won't get it. Just abandoned.