Created
January 21, 2013 20:15
-
-
Save stringsn88keys/4588895 to your computer and use it in GitHub Desktop.
The mission: remove "return" from the following function. def multiple_of_three(n) return n % 3 == 0 ? "True" : "False"
end
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 figured that the "correctness" test is the existence of "return" as a word within the function, so... | |
def multiple_of_three(n) | |
eval "#{'r e tu rn'.split.join} n % 3 == 0 ? \"True\" : \"False\"" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment