Ruby FAQ: How do I create a variable length argument list in a Ruby method?
One thing I really dig about Ruby is that I can create methods and functions that support variable-length argument lists. It's not something you need all the time, but it sure is nice to have it when you need it.
Here's how you create and then call a Ruby function/method that can take a variable number of arguments:
