What is the logic behind this result?

Viewed 759
def foo(_, _='override')
  _
end

p foo("bye bye")
p foo("hello", "world")

Output:

"override"
"hello"

I could understand if the result was:

"override"
"world"

or even:

"bye bye"
"hello"

But the result I'm getting causes me confusion.

3 Answers
Related