Created
January 14, 2014 16:07
-
-
Save pjb3/8420773 to your computer and use it in GitHub Desktop.
Looking when default arguments are resolved in Ruby 2.0
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 foo(x: wtf) | |
end | |
puts "wtf did not get called when the method was defined" | |
foo x: 1 | |
puts "wtf did not get called when we passed a value for x" | |
begin | |
foo | |
rescue => ex | |
puts "tried to call wtf, so we got #{ex.class} #{ex.message}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment