Skip to content

Instantly share code, notes, and snippets.

@dipth
Last active December 19, 2015 07:19
Show Gist options
  • Save dipth/5917504 to your computer and use it in GitHub Desktop.
Save dipth/5917504 to your computer and use it in GitHub Desktop.
unless
------
UNLESS
------
A2
B1
C1
D1
------
IF
------
A2
B1
C1
D1
puts "------"
puts "UNLESS"
puts "------"
unless true && true
puts "A1"
else
puts "A2"
end
unless false && true
puts "B1"
else
puts "B2"
end
unless true && false
puts "C1"
else
puts "C2"
end
unless false && false
puts "D1"
else
puts "D2"
end
puts "------"
puts "IF"
puts "------"
if !(true && true)
puts "A1"
else
puts "A2"
end
if !(false && true)
puts "B1"
else
puts "B2"
end
if !(true && false)
puts "C1"
else
puts "C2"
end
if !(false && false)
puts "D1"
else
puts "D2"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment