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)
> 
> 
> 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"]

I believe that in your method definition you have passed 6 parameters

def mymethod(v1, v2, v3, v4, v5, v6)
...
end

you need to only pass one parameter
def mymethod(v1)
...
end

and inside your method you have to extract the values to suit your 
needs.

I wish this helps
Cheers
-- 
Posted via http://www.ruby-forum.com/.