Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
The mission: remove "return" from the following function. def multiple_of_three(n) return n % 3 == 0 ? "True" : "False" end
# 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\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment