From: Josh Cheek Date: 2011-05-27T13:30:34+09:00 Subject: Re: "Local variable within code blocks do not interfere with those outside the block" --e0cb4e88758fc0042d04a43a6531 Content-Type: text/plain; charset=ISO-8859-1 On Thu, May 26, 2011 at 11:11 PM, Bala TS wrote: > I have jpg file Here the results are available(screen shot) > > by > bala(bdeveloper01) > > Attachments: > http://www.ruby-forum.com/attachment/6232/localvariable.jpg > > > -- > Posted via http://www.ruby-forum.com/. > > r.to_s is equal to "#{r}", but more straightforward. So when you want to convert something to a string, it is better to use its to_s method. The puts method, though, invokes the to_s method on the object before it outputs it. So when you are sending an object to puts, you don't need to worry about whether it is a string at all. puts "#{r}" # so rather than this puts r # instead use this --e0cb4e88758fc0042d04a43a6531--