From: Rico Date: 2008-09-07T07:14:00+09:00 Subject: Re: Ruby interpreter bug? On Sep 6, 9:19 pm, Ryan Hinton wrote: > I get a core dump when executing the following code. > > class Bob >   ['hi', 'hello', 'howdy', 'goodbye'].each do |mname| >     instance_eval <<-EOF >       def #{mname} >         puts #{mname} >       end >     EOF >   end > end > Bob.hi > You have left out the quotes in << puts #{name} >>. This results in (for example): def hi puts hi end ...which results in the function calling itself forever. On my machine (exact same Ruby version and patchlevel, but on Windows) I get a SystemStackError: (eval):2:in `hi': stack level too deep (SystemStackError) from (eval):2:in `hi' But it's understandable that you core dump instead. Hope this helps. Rico