Skip to content

Instantly share code, notes, and snippets.

@jlong
Created April 7, 2009 13:43
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 jlong/91237 to your computer and use it in GitHub Desktop.
Save jlong/91237 to your computer and use it in GitHub Desktop.
Ruby allows you to switch on multiple expressions with a case statement. Why do people still insist on using elsif?
case
when expression_1
...
when expression_2
...
when expression_3
...
else
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment