Prev: Help : Error in scrubyt
Next: DXF Writer?
From: Roger Pack on 18 Feb 2010 12:54 Shouldn't the following be a syntax error? >> ' 3' '4' => " 34" ? -rp -- Posted via http://www.ruby-forum.com/.
From: Gary Wright on 18 Feb 2010 13:34 On Feb 18, 2010, at 12:54 PM, Roger Pack wrote: > Shouldn't the following be a syntax error? > >>> ' 3' '4' > => " 34" Rarely seen, but string literal "implicit" concatenation has always been a feature. Gary Wright
From: Tony Arcieri on 18 Feb 2010 17:06 [Note: parts of this message were removed to make it a legal post.] On Thu, Feb 18, 2010 at 11:34 AM, Gary Wright <gwtmp01(a)mac.com> wrote: > Rarely seen, but string literal "implicit" concatenation has always been a > feature. > I remember at one point I tried Python-style triple quotes, all "cool, Ruby supports that too!" Except it doesn't... :/ -- Tony Arcieri Medioh! A Kudelski Brand
From: Roger Pack on 18 Feb 2010 17:32 >> Shouldn't the following be a syntax error? >> >>>> ' 3' '4' >> => " 34" > > > Rarely seen, but string literal "implicit" concatenation has always been > a feature. Yeah--for me it has almost always represented a bug (like a missing , between parameters or what not). Ahh well. -rp -- Posted via http://www.ruby-forum.com/.
From: Robert Klemme on 19 Feb 2010 02:04
On 02/18/2010 11:32 PM, Roger Pack wrote: >>> Shouldn't the following be a syntax error? >>> >>>>> ' 3' '4' >>> => " 34" >> >> Rarely seen, but string literal "implicit" concatenation has always been >> a feature. > > Yeah--for me it has almost always represented a bug (like a missing , > between parameters or what not). > Ahh well. I can't remember having used it but it can be useful if you want to create a longer string and do not want to use a here document (because of indentation issues for example). Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ |