Created
April 7, 2009 13:43
-
-
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?
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
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