From: Joel VanderWerf Date: 2007-04-24T01:10:43+09:00 Subject: Re: Arrow operator with dash instead of equals (->) Brian Candler wrote: > On Mon, Apr 23, 2007 at 09:47:14AM +0900, Timothy Hunter wrote: >> Now, for completeness' sake, it actually is possible to define a method >> named '->', but the only way you could call it would be by using 'send', >> and I'm guessing you don't want to do that. It would look like this: >> >> o.send('->', args) > > This can lead to smiley programming. I recently found myself writing > > o.send(:[]=, *args) > > It's shorter than > > o[args[0..-2]] = args[-1] :-D very nice! -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407