-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
In Ruby 2.1.1, there is a regression in Hash#reject. It accidentally returns a plain Hash object, not an object of the inherited class.
See the blog post: https://www.ruby-lang.org/en/news/2014/03/10/regression-of-hash-reject-in-ruby-2-1-1/
We need to do three things:
1) Add a select method in OrderedHash to account for this. We already have a reject method that avoids this problem.
2) Add #select and #reject methods to the class HashWithIndifferentAccess to match what Rails core did. https://github.com/rails/rails/commit/af39f5871094d8c241103182edebedbb26e31d4c