From: Pit Capitain Date: 2005-01-25T18:31:56+09:00 Subject: Re: Convert a Hash into an Array Richard Turner schrieb: > Cool! I was wondering how to convert a hash to an array, dropping the > keys in the process. I see that inject does the job nicely. Is there > another way too? > > >>>h.inject([]){|a, (k, v)| a << v} > > => ["111", "222"] h = {"a"=>"111", "b"=>"222"} p h.values # => ["111", "222"] Regards, Pit