From: Peter Szinek Date: 2007-11-06T20:03:09+09:00 Subject: Re: Passing all parameters to a method with a unique variable Hi Mario, > I'm trying to pass to a method all the parameters in a global variable: To answer your question: $allparameters=["dos","ie","4","alone","","8"] and $allparameters="dos","ie","4","alone","","8" does the same - it assigns the array ["dos","ie","4","alone","","8"] to the global variable $allparameters. After this, you want myclass.mymethod(*$allparameters) The problem is that myclass.mymethod expects 6 parameters, whereas you pass in an array containing 6 things (but that's still 1 parameter, no matter how much of what it contains). The splat or unnarray operator (*) splits it up into 6 pieces which is what your function wants. I am quite sure that more people will join this thread, so I am leaving the "never use global variables", "using 6 unnamed params is probably not a very good idea", "allparameters is not the Ruby way to name a variable" style comments to them :-) Cheers, Peter ___ http://www.rubyrailways.com http://scrubyt.org