Skip to content

Instantly share code, notes, and snippets.

@dmerrick
Last active August 29, 2015 14:14
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 dmerrick/a0da11d9e71a64426988 to your computer and use it in GitHub Desktop.
Save dmerrick/a0da11d9e71a64426988 to your computer and use it in GitHub Desktop.
# 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