Skip to content

Instantly share code, notes, and snippets.

@stringsn88keys
Created January 21, 2013 20:15
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 stringsn88keys/4588895 to your computer and use it in GitHub Desktop.
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
# 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