Skip to content

Instantly share code, notes, and snippets.

@joho
Forked from yob/gist:117889
Created May 26, 2009 04:34
Show Gist options
  • Save joho/117894 to your computer and use it in GitHub Desktop.
Save joho/117894 to your computer and use it in GitHub Desktop.
irb(main):005:0> n = "James"
=> "James"
irb(main):006:0> n.strip!
=> nil
irb(main):007:0> n
=> "James"
# that's just plain weird
>> n = "john "
=> "john "
>> n.strip!
=> "john"
>> n.strip!
=> nil
>> n
=> "john"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment