peach icon indicating copy to clipboard operation
peach copied to clipboard

Making Hash#pselect work the same as Hash#select

Open aaronklor opened this issue 11 years ago • 0 comments

When using pselect on hashes, the return is an array of arrays

[['key1', 'value1'], ['key2', 'value2'], ...]

This differs from Hash's implementation that returns a new hash.

{'key1' => 'value1', 'key2' => 'value2', ...}

This PR should resolve this disparity.

Hash#select doc for reference http://www.ruby-doc.org/core-2.1.0/Hash.html#method-i-select

aaronklor avatar Jan 02 '14 17:01 aaronklor