From: Matt Todd Date: 2006-10-03T12:32:49+09:00 Subject: Re: redefining splat? > Can you redefine the * prefix operator? Why do you need to? I know slight modifications to do some cool wizardry can be adventageous, but to me, what it seems like you want is a completely different thing that will completely redefine the *. (Even if only locally.) > I'm in the middle of refactoring some code. I have a function that > looks like this > > def send_command cmd_arry > type = cmd_arry.shift > @comms.send(type, *cmd_arry) > end What's wrong with... def send_command cmd_ary cmd = Command.new(cmd_ary) @comms.send(cmd.type, cmd.params) end Or even... def send_command cmd_ary cmd = Command.new(cmd_ary) @comms.send cmd end with #send overwritten to do something special with the Command class? (Still retaining the original functionality otherwise.) Just my opinion. M.T.