Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
What does the following print? I was surprised. (Actually, I was surprised it was legal syntax.)
def foo(a=:default, b)
puts "a=#{a}, b=#{b}"
end
foo(:value)
foo(:x, :y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.