From: Rick DeNatale Date: 2007-05-05T04:39:25+09:00 Subject: Re: RCR? On 5/4/07, Joel VanderWerf wrote: > class String > alias - delete > end > > "foobar" - "oa" # => "fbr" > > Using an operator makes it abundantly clear that neither string is being > modified. But then of course you don't get arity >= 2 version of delete. > > Was String#- being reserved for something else? The thing that vaguely bothers me about this definition of String#- is that it doesn't seem ot have the same relationship with String#+ that + and minus usually have. irb(main):002:0> class String irb(main):003:1> alias - delete irb(main):004:1> end => nil irb(main):005:0> "value1" + "value2" => "value1value2" irb(main):006:0> "value1" + "value2" - "value2" => "1 -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/