Skip to content

Instantly share code, notes, and snippets.

@alekst
Created January 27, 2014 15:14
Show Gist options
  • Save alekst/8650152 to your computer and use it in GitHub Desktop.
Save alekst/8650152 to your computer and use it in GitHub Desktop.
unless
irb(main):001:0> array = ["a", "b", "c"]
=> ["a", "b", "c"]
irb(main):002:0> unless array[0] == "b"
irb(main):003:1> array << "d"
irb(main):004:1> end
=> ["a", "b", "c", "d"]
irb(main):005:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment