Skip to content

Instantly share code, notes, and snippets.

@stevenbristol
Created December 16, 2008 14:30
Show Gist options
  • Save stevenbristol/36468 to your computer and use it in GitHub Desktop.
Save stevenbristol/36468 to your computer and use it in GitHub Desktop.
irb(main):001:0> a, b = nil, 2
=> [nil, 2]
irb(main):002:0> a &&= b
=> nil
irb(main):003:0> a = 1
=> 1
irb(main):004:0> a &&= b
=> 2
irb(main):005:0> a
=> 2
irb(main):006:0> b
=> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment