Feature #16252
Hash#partition should return hashes
Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
Description
Hash#partition is implemented by Enumerable so it just returns two arrays of arrays
{1=>2,3=>4}.partition{|k,|k==1} #=> [[[1, 2]], [[3, 4]]]
But I think it would make more sense to behave similarly to Hash#select and Hash#reject
{1=>2,3=>4}.partition{|k,|k==1} #=> [{1=>2}, {3=>4}]
No data to display