Skip to content

Instantly share code, notes, and snippets.

@lee-dohm
Created May 24, 2013 04:34
Show Gist options
  • Save lee-dohm/5641293 to your computer and use it in GitHub Desktop.
Save lee-dohm/5641293 to your computer and use it in GitHub Desktop.
def hello
puts 'Hello'
end
# a equals nil and prints 'Hello'
a = true && hello
# b equals false
b = false && hello
# c equals true
c = true || hello
# d equals nil and prints 'Hello'
d = false || hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment