Skip to content

Instantly share code, notes, and snippets.

@stevencombs
Created October 16, 2013 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencombs/7014356 to your computer and use it in GitHub Desktop.
Save stevencombs/7014356 to your computer and use it in GitHub Desktop.
Unless control flow tests for a false condition
# Ruby Getting Started with Programming
# A Codecademy Ruby (Unless) assignment
# Dr. Steven B. Combs, coding novice
hungry = true
unless hungry # tests for false condition
puts "I'm writing Ruby programs!"
else # if not false, but true
puts "Time to eat!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment