From: x1 Date: 2006-12-19T21:00:48+09:00 Subject: Re: DRb, Ruby & JRuby - Questions & Issues / dynamic method calls Thank you Eric On 12/19/06, Eric Hodel wrote: > On Dec 18, 2006, at 19:43, x1 wrote: > > > ------------------------------------------------ > > # Does not work: > > def test(a,b,c) > > return @@connection.send(a).send(b).send(c) > > end > > test("getForeignListing", ["getListing", 1441], "getStreet") > > > > test.rb:4:in `send': ["getListing", 5053500] is not a symbol > > (TypeError) > > This won't ever work. > > $ ri Object#send > ------------------------------------------------------------ Object#send > obj.send(symbol [, args...]) => obj > obj.__send__(symbol [, args...]) => obj > ------------------------------------------------------------------------ > Invokes the method identified by symbol, passing it any arguments > specified. You can use __send__ if the name send clashes with an > existing method in obj. > > You want: > > send(*['getListing', 5053500]) > > -- > Eric Hodel - drbrain@segment7.net - http://blog.segment7.net > > I LIT YOUR GEM ON FIRE! > > >