Y
Hacker News
new
|
ask
|
show
|
jobs
by
tibbon
4665 days ago
You can do multiple return values of mixed (and non-predetermined) types in Ruby too.
2 comments
jurre
4665 days ago
Meh, not really. In ruby `return x, y` is just syntactic sugar for `return [x, y]`, ie returning an array. It's also an indication that you probably need a class.
link
gutsy
4665 days ago
I did not know that, but then I've only played around with Ruby a little bit.
link