Skip to content

Instantly share code, notes, and snippets.

@dkam
Created June 17, 2012 10:49
Show Gist options
  • Save dkam/2944188 to your computer and use it in GitHub Desktop.
Save dkam/2944188 to your computer and use it in GitHub Desktop.
irb(main):001:0> a=nil
=> nil
irb(main):002:0> a || "Hello"
=> "Hello"
irb(main):003:0> a="World"
=> "World"
irb(main):004:0> a || "Hello"
=> "World"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment