Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created October 6, 2015 13:18
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 anonymous/fbd23b8a4631a3a6cb08 to your computer and use it in GitHub Desktop.
Save anonymous/fbd23b8a4631a3a6cb08 to your computer and use it in GitHub Desktop.
def foo(name = 1, bar)
p name
p bar
end
def foo2(bar, name = 1)
p name
p bar
end
foo('a')
# => 1
# => "a"
foo2('a')
# => 1
# => "a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment