From: RichardOnRails Date: 2009-07-29T06:30:08+09:00 Subject: Re: Unexpected output in a metaprogramming application On Jul 28, 9:32 am, RichardOnRails wrote: > On Jul 28, 2:24 am, Harry Kakueki wrote: > > > > > > I don't know if this totally fixes your problem, but take a look at this. > > > > def show(stmt) > > >  puts stmt > > >  puts "=> " > > >  eval(stmt).to_s # Remove the puts > > >  puts > > > end > > > > Harry > > > I do not use eval so I can not tell you much about it. > > And I don't have time to go through your code carefully right now. > > But, do you need #to_s   ? > > > def show(stmt) > >   puts stmt > >   puts "=> " > >   eval(stmt) ####### > >   puts > > end > > > Harry > > > -- > > A Look into Japanese Ruby List in Englishhttp://www.kakueki.com/ruby/list.html > > Hi Harry, > > Thanks for your response, esp. the Japanese/English site. > > I probably don't need the "puts".  I'll check this out tomorrow. > > Best wishes, > Richard I didn't know exactly which "puts" you thought to be problematic. But after getting Gregory's response, my eyes were opened and my guess is the puts before the eval is what you were referring to also. Again thanks and best wishes, Richard