From: Eric Hodel Date: 2006-08-02T08:40:48+09:00 Subject: Re: Sending Multiple Args to a Method Object On Aug 1, 2006, at 4:04 PM, Harris Reynolds wrote: > I am trying to call a method that has multiple arguments using > reflection. However, when I invoke the method.call method passing > the arguments as an array it chokes with the following error: > > ArgumentError (wrong number of arguments (1 for 4)) > > The ruby interpreter thinks that my single array is the parameter I > am passing in; however, the array I am passing in contains 4 > object that map directly to the 4 arguments the interpreter is > looking for. Is there another way to accomplish this other than > using method.call? method.call(*[arg1, arg2, arg3, arg4]) -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com