From: Josh Cheek Date: 2010-04-03T09:44:07+09:00 Subject: Re: A little help needed --001636b2af63a9134004834a6462 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Apr 2, 2010 at 2:15 PM, Tom Stone wrote: > puts"#{@x}" > >error > > You can also just say @x, here, because puts will convert the objects it receives into strings by calling the to_s method on them puts "#{@x}" puts @x.to_s puts @x In this case will all be the same, there is no need to interpolate strings here. At least in 1.9.1 this is true. I tried it in 1.8 and the last one outputted "nil" which is odd, and the only way I can think of that would explain it is that puts checks to see if the variable is nil before calling to_s, and explicitly outputs "nil" if it is. --001636b2af63a9134004834a6462--