On Wed, 9 Apr 2003 01:03:24 +0900, Hal E. Fulton wrote: >>>> That seems odd to me. >>> Yes. It's not really subtraction as implied by the '-' minus >>> operator. Maybe it should be renamed to #remove_all_from. :) >> I think it's more confusing when dealing with numbers than with >> Objects. >> >> i = Object.new # => #<Object:0x277c230> >> j = Object.new # => #<Object:0x276fdf8> >> k = Object.new # => #<Object:0x2768898> >> a = [i, j, k, i, i] >> >> a - [i] # => [j, k] >> [i].each { |e| a.delete(e) } >> # => [j, k] >> >> You're removing a specific Object from an array. At least, IMO. > Hmmmmmmm. > > x = ["one", "one", "two", "two", "two"] > y = ["two"] > > What do you want x-y to be here? I want ["one", "one", "two", "two", "two"], because they're not the same objects. But maybe that's me. I'd use #delete_if if I wanted something other than #delete-like behaviour. At least IMO. -austin -- Austin Ziegler, austin / halostatue.ca on 2003.04.08 at 12:26:54