From: clockwork@... Date: 2007-08-04T02:58:13+09:00 Subject: Re: Beginner with a question. ------=_Part_92159_20099029.1186163896468 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Awesome. Thanks. Whats the difference between single and double quoted strings in ruby ? On 8/3/07, Tim Pease wrote: > > On 8/3/07, clockwork@sigsys.org wrote: > > > > So what sort of silly syntactical error am I making ? > > > > Ruby does not implicitly convert Integers into Strings. You need to > explicitly tell Ruby this is what you are doing. > > puts "Try #{finalnum} instead" > > Inside double quoted strings, anything inside a #{ } delimiter is > treated as Ruby code, and it is evaluated by the interpreter and > converted into a string. So you could also write (as you did > originally) > > puts "Try #{favnum + plus1} has the result." > > Hope that makes sense. Oh, and welcome to Ruby! > > Blessings, > TwP > > ------=_Part_92159_20099029.1186163896468--