The spec for Hash#select should ignore the order of results
Reported by Peter Burns | May 24th, 2008 @ 06:53 PM | in 1.0 preview
I ran spec:check and got this failure:
Hash#select returns an array of entries for which block is true FAILED
Expected [[:d, 2], [:c, 4]]
to equal [[:c, 4], [:d, 2]]
This test failed because it presumed an order in the array returned by Hash#select, but a Hash has no guarantee of any particular order. In the attached patch I changed this and another test to first sort the results before comparing them.
Comments and changes to this ticket
-
Brian Ford May 24th, 2008 @ 08:47 PM
- → State changed from new to resolved
Committed in http://github.com/brixen/rubyspe.... Thanks!
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
