Skip to content

Instantly share code, notes, and snippets.

@benburry
Created April 10, 2014 23:41
Show Gist options
  • Save benburry/10432346 to your computer and use it in GitHub Desktop.
Save benburry/10432346 to your computer and use it in GitHub Desktop.
irb(main):006:0> roles = ['one', 'two']
=> ["one", "two"]
irb(main):007:0> roles.include? 'one' && true
=> false
irb(main):008:0> roles.include?('one') && true
=> true
irb(main):009:0> roles.include? 'one' and true
=> true
@chrisjubb
Copy link

madness

@jordanorelli
Copy link

>> roles.include? true && 'one'
=> true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment