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

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.
I did not know that, but then I've only played around with Ruby a little bit.