Skip to content

Instantly share code, notes, and snippets.

@hoffm
Created October 19, 2012 17:00
Show Gist options
  • Save hoffm/3919341 to your computer and use it in GitHub Desktop.
Save hoffm/3919341 to your computer and use it in GitHub Desktop.
Oddness of '<<' and String constants
1.8.7-p370 :008 > MICHAEL = "michael"
=> "michael"
1.8.7-p370 :009 > a = MICHAEL
=> "michael"
1.8.7-p370 :010 > a << " hoffman"
=> "michael hoffman"
1.8.7-p370 :011 > a
=> "michael hoffman"
1.8.7-p370 :012 > MICHAEL
=> "michael hoffman"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment