From: Eric Hodel Date: 2006-08-19T03:56:56+09:00 Subject: Re: [Facets] Multiple arguments for Hash#delete On Aug 17, 2006, at 9:05 AM, Daniel Schierbeck wrote: > nobu@ruby-lang.org wrote: >>> hsh = {:a => 1, :b => 2, :c => 3} >>> hsh.delete :a, :b #=> [1, 2] >>> hsh.delete :c #=> 3 >> The class of returned value varies according to the number of >> arguments? > > Yes. I don't see that as a big problem though, especially if > there's a second method that *always* returns an array: > > hsh.delete_at :a #=> [1] > hsh.delete_at :b, :c #=> [2, 3] > > It may be too much magic for some Then it probably shouldn't go into Ruby. Especially if you are proposing two deletion methods that I have to figure out in order to get the behavior I want. My brain is full enough, thanks. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com