Where is Ruby's string literal juxtaposition feature officially documented? -


i realized if juxtapose sequence of ruby string literals (e.g. 'a' "b" 'c'), it's equivalent concatenation of string literals. however, can't find language feature documented anywhere. i've searched using terms "juxtaposition" , "concatenation", found reference in couple of stackoverflow responses. can point me definitive reference?

update

this now officially documented in rdoc ships ruby.

changes propagate rubydoc next time build documentation.

the added documentation:

adjacent string literals automatically concatenated interpreter:    "con" "cat" "en" "at" "ion" #=> "concatenation"   "this string contains "\   "no newlines."              #=> "this string contains no newlines."  combination of adjacent single-quote, double-quote, percent strings concatenated long percent-string not last.    %q{a} 'b' "c" #=> "abc"   "a" 'b' %q{c} #=> nameerror: uninitialized constant q 

original

right now, isn't anywhere in official ruby documentation, think should be. pointed out in comment, logical place docs go be: http://www.ruby-doc.org/core-2.0/doc/syntax/literals_rdoc.html#label-strings

i've opened pull request on ruby/ruby documentation added.

if pull request merged, automatically update http://www.ruby-doc.org. i'll update post if/when happens. ^_^

the other mentions of i've found online are:


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -