Next Ruby Quiz: same return value or different? Also what value do they return?

def foo(_ = 1, _: 2)
_
end

def bar(_ = 1, _: 1 + 1)
_
end

p foo
p bar

3
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Replies