From: Ilias Lazaridis Date: 2005-04-02T22:19:44+09:00 Subject: Re: [EVALUATION] - E03 - jamLang Evaluation Case Applied to Ruby Jacob Fugal wrote: > On Thu, 24 Mar 2005 10:59:50 +0900, Ilias Lazaridis wrote: [...] >>"#" is used as a comment marker _and_ partly within code. >> >>Can I use another comment marker? > > No. To my knowledge there is only the one comment syntax in ruby. ok >>Can I write "puts "#{thisMethodName}: Hello World"" in an different >>manner, without the use of "#"? > > Sure. #{thisMethodName} in a string literal simply calls .to_s on the > enclosed expression and inserts it at the designated location. So we > can pull that out such: > > puts thisMethodName.to_s + ": Hello World" ok. I like this contruct more: "puts "#{thisMethodName}: Hello World" but the usage of "#" is missleading (comment marker) > The + operator performs concatenation when its arguments are strings. > > Jacob Fugal .. -- http://lazaridis.com