From: Michael Campbell Date: 2003-12-06T01:01:39+09:00 Subject: Re: Dumb question to which I ought to know the answer by now Mark J. Reed wrote: > On Fri, Dec 05, 2003 at 11:32:51PM +0900, nobu.nokada@softhome.net wrote: > >>Once I'd proposed similar; >> >> hash[*keys] = *values >> > > > That would be handy, but I don't think it's possible to define such > a method in current Ruby. The parameters to []= are flattened; > you wouldn't be able to tell where the keys stopped and the values > started, unless you assumed that keys.length == values.length, which > is not always a valid assumption where I've seen the Perl idiom used. I think in Nobu's code, keys and values are separate arrays, so there is no need to know where keys stop and values begin. Or have I misread? __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/