Skip to content

Instantly share code, notes, and snippets.

@bascht
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save bascht/03015a781dc794bfea3c to your computer and use it in GitHub Desktop.

Select an option

Save bascht/03015a781dc794bfea3c to your computer and use it in GitHub Desktop.
[3] pry(main)> def foo(bar, baz=bar); baz; end
=> :foo
[4] pry(main)> foo("oha")
=> "oha"
>>> def foo(bar, baz=bar):
... pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'bar' is not defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment