James Gray wrote:
> On Aug 15, 2006, at 8:14 AM, Peter Bailey wrote:
> 
>> You mean, it's because I was simply missing quotes around my "#{}"
>> expression that it was regarded as a comment? Well, I guess I can
>> certainly understand that. Thanks a lot.
> 
> Right.  But never use:
> 
>    "#{var}"
> 
> because that's just a confusing way to say:
> 
>    var.to_s
> 
> And if the variable is already a String, you really just want:
> 
>    var
> 
> James Edward Gray II

OK. I'm a bit confused, though. I've been using #{var} for quite a while 
now. I thought it was needed when getting a variable within a block. Is 
it when it's in double quotes that you suggest not using it?

-- 
Posted via http://www.ruby-forum.com/.