From: "David A. Black" Date: 2009-11-19T21:13:13+09:00 Subject: Re: Class inside a Method Body On Tue, 17 Nov 2009, Brian Candler wrote: > David A. Black wrote: >> the code is executed as it's encountered, and you get output before >> and after the execution of the method definition. (Of course the >> method body isn't executed until there's an object to which to send >> the "x" method.) > > Except: when reading in a source file there is an initial parsing step > to build the syntax tree, and if that fails then you get a parse error > and nothing is executed. Mismatched 'end' statements will do that, for > example. I hadn't gotten into parsing just to keep it simple -- but in fact, it does appear to be a parse-time/syntax error, rather than a runtime error, which I hadn't noticed. David -- THE COMPLEAT RUBYIST, Ruby training with Black/Brown/McAnally! January 22-23, Tampa, Florida Info and registration at http://www.thecompleatrubyist.com -------------------------------------- My new job: http://tinyurl.com/yfpn9hz