Skip to content

Instantly share code, notes, and snippets.

@BanzaiMan
Last active May 30, 2017 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BanzaiMan/865f8d135350269c3eccdda44344d754 to your computer and use it in GitHub Desktop.
Save BanzaiMan/865f8d135350269c3eccdda44344d754 to your computer and use it in GitHub Desktop.
Display of Strings with newlines
strokkur[~]$ rbenv global 2.3.4
strokkur[~]$ irb
irb(main):001:0> "a\nb"
=> "a\nb"
irb(main):002:0> exit
strokkur[~]$ pry
[1] pry(main)> "a\nb"
=> "a\nb"
[2] pry(main)> exit
strokkur[~]$ rbenv global 2.4.0
strokkur[~]$ irb
irb(main):001:0> "a\nb"
=> "a\nb"
irb(main):002:0> exit
strokkur[~]$ pry
[1] pry(main)> "a\nb"
=> "a\n" + "b"
[2] pry(main)> exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment