Passing multi params

How do I pass a varying number of parameters to an inner method?

def outer(first,*therest)
inner(therest)# pass all args to inner
end

Thanks for your help,Paul

How do I pass a varying number of parameters to an inner method?

def outer(first,*therest)
inner(therest)# pass all args to inner
end

def outer(first, *args)
inner(*args)
end

···

On Thu, 22 Apr 2004 06:09:00 +0900 Paul Vudmaska paul@vudmaska.com wrote:

Thanks for your help,Paul


Ryan Pavlik rpav@mephle.com

“Wow, I’m not dangerously incompetent!” - 8BT

Paul Vudmaska wrote:

How do I pass a varying number of parameters to an inner method?

def outer(first,*therest)
inner(therest)# pass all args to inner

   inner(*therest)

end

Thanks for your help,Paul

the * turns the array back into a parameter list

···


Mark Sparshatt