From: Anurag Priyam Date: 2011-01-14T03:17:42+09:00 Subject: Re: Hash#select, different than documented? > However, that is not the behavior I am seeing in my ruby 1.8.6.  Is that > documentation for a later version of ruby, in which this behavior > changed? Or is the documentation just wrong? I remember a mail on the list by James Britt stating that ruby-doc.org has been updated for 1.9 to be the default. I can confirm the expected behavior (returning a Hash) on 1.9.2 and 1.8.7. > Is there any other search behavior implemented on Hash I could be using > instead, with more convenient behavior for finding hash subsets, and/or > finding hash keys whose values are matched by a certain block? Passing the return value of select to Hash.[] method might help your case. >> h = { "a" => 100, "b" => 200, "c" => 300 } >> Hash[h.select {|k,v| k > "a"}] #=> {"b" => 200, "c" => 300} -- Anurag Priyam http://about.me/yeban/