Skip to content

Instantly share code, notes, and snippets.

Created March 12, 2013 18:18
Show Gist options
  • Save anonymous/5145446 to your computer and use it in GitHub Desktop.
Save anonymous/5145446 to your computer and use it in GitHub Desktop.
def stupid_return(arg)
arg == 3 ? 'stupid' : arg
end
[*1..5].each { |i| puts stupid_return(i) }
#=> 1 2 stupid 3 4 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment