Created
February 27, 2015 18:09
-
-
Save JKring/b1c53fdee672929234ec to your computer and use it in GitHub Desktop.
Ruby is weird
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def do_something(str: this_is_not_defined_anywhere) | |
puts str | |
end | |
# Works fine | |
do_something(str: 'dogs') | |
# Obviously doesn't work fine | |
do_something | |
# => NameError: undefined local variable or method `this_is_not_defined_anywhere' for main:Object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment