From: Devin Mullins Date: 2005-12-18T09:10:10+09:00 Subject: Re: Rescuing SyntaxError Caleb Tennis wrote: >> The reason the inner rescue is not triggered is that the exception >> occurs while eval is turning the string into a parse tree, before it >> starts executing the parse tree. > > Sure thing. Is there any way to catch it though? begin puts "this is text rescue SyntaxError puts "Syntax Error!" end __END__ No. How is Ruby supposed to know that the rescue block isn't supposed to be part of that unterminated puts string from the line before? Do the eval, load, or require thing as suggested. Devin