From: Jano Svitok Date: 2007-11-06T19:51:07+09:00 Subject: Re: Passing all parameters to a method with a unique variable On 11/6/07, Mario Ruiz wrote: > I'm trying to pass to a method all the parameters in a global variable: > > $allparameters="dos","ie","4","alone","","8" > > ... > - myclass.mymethod($allparameters) + myclass.mymethod(*$allparameters) > > > I'm doing that because I'm using this parameters a lot. > The error is: wrong number of arguments (1 for 6) (ArgumentError) > > I tried also: $allparameters=["dos","ie","4","alone","","8"] The "splash" operator * sort of "expands" the contents of the array. Note that it's better to avoid global variables if possible. J.