From: Arlen Cuss Date: 2008-02-20T18:17:42+09:00 Subject: Re: What does *args do? ------=_Part_23128_7757638.1203499069877 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, It's called a "splat". A variable at the end of the function call with an asterisk at the start [or elsewhere in Ruby 1.9?] "takes the slack", as such, and allows an indefinite number of extra arguments. For example: >> def fun blah, *args >> puts "blah: #{blah.inspect}, args: #{args.inspect}" >> end => nil >> fun 1 blah: 1, args: [] => nil >> fun 1, 2 blah: 1, args: [2] => nil >> fun 1, 2, 3 blah: 1, args: [2, 3] => nil >> Cheers, Arlen. ------=_Part_23128_7757638.1203499069877--