Skip to content

Instantly share code, notes, and snippets.

@benburry
Created April 11, 2014 13:53
Show Gist options
  • Save benburry/10470772 to your computer and use it in GitHub Desktop.
Save benburry/10470772 to your computer and use it in GitHub Desktop.
irb(main):008:0> roles = ['one', 'two']
=> ["one", "two"]
irb(main):009:0> roles.include? 'one' && true
=> false
irb(main):010:0> roles.include? 'one' and true
=> true
irb(main):011:0> roles.include?('one') && true
=> true
irb(main):012:0> roles.include? true && 'one'
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment