Last active
August 29, 2015 14:14
-
-
Save dmerrick/a0da11d9e71a64426988 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I don't know if the guide goes on to address these points, | |
# but I thought it might be kinda fun to help you on your path. | |
if 4 > 5 | |
# ruby programmers tend to use 2 spaces instead of 4 for indentation | |
# also, even though it's confusing, you'll generally use "puts" instead of "print" | |
puts "I'm soooo wrong it's painful" | |
# I like to avoid using parentheses to group things, so I'd rewrite what you had as: | |
#elsif 4 > 5 != true | |
# or: | |
#elsif 4 > 5 == false | |
# or maybe just: | |
elsif !(4 > 5) | |
# ...because in Ruby, you should never need to say "== true" | |
# it'd be redundant, for reasons you will come to understand | |
puts "I'm the rightest of them all!" | |
else | |
puts "I don't know why this is happening" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment