Skip to content

Making Hash#pselect work the same as Hash#select#10

Open
aaronklor wants to merge 1 commit intoschleyfox:masterfrom
aaronklor:master
Open

Making Hash#pselect work the same as Hash#select#10
aaronklor wants to merge 1 commit intoschleyfox:masterfrom
aaronklor:master

Conversation

@aaronklor
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant