Jamis Buck wrote:
> Robert Klemme wrote:
> 
>>
>> text = "some text coming from somewhere"
>> begin
>>   eval "def foo; #{text} ; end"
>> rescue SyntaxError => e
>>   # do something when it has a syntax error
>> end
>>
>>    robert
>>  
>>
> 
> Hey, that's clever.  I'll have to remember that trick. :)
> 

Except, if you're paranoid...

text = "end; puts 'Gotcha'; begin; "