From: Christoph Date: 2002-07-14T23:01:52+09:00 Subject: Re: hey! where's #count? "ts" wrote in .... > Do you expect this ? Yes (I actually tested my snippet on a Hash example to make sure that it works this way - nonetheless if I were to vote on this as an RCR I'd vote against it since it doesn't seem useful enough to put in Enumerable) .... > > pigeon% cat b.rb > #!/usr/bin/ruby > module Enumerable > def uniq > hsh = {} > each {|e| hsh[e] = true } > hsh.keys > end > end .... > a = {"a" => 12, 12 => "a"} > b = a.uniq > p b, b.type > pigeon% > > pigeon% b.rb > [[12, "a"], ["a", 12]] .... /Christoph