From: Caleb Clausen Date: 2007-04-23T23:43:42+09:00 Subject: Re: Arrow operator with dash instead of equals (->) It's not possible to define a -> operator in Ruby, but you can (sometimes) define <-. Watch: class Right def -@ return Negated.new(self) end class Negated def initialize(right) @inner=right end attr :inner end end class Left def <(negated_right) self.inspect + " <- " + negated_right.inner.inspect end end Left.new <- Right.new #=> "# <- #" It's actually two operators, so there's a caveat: if the right-side class already defines unary minus, this won't work. (I first read about this trick in a C++ book. I'm not necessarily recommending it.)