#362 √ resolved
Brian Mitchell

Hash#only adds nil values for keys

Reported by Brian Mitchell | June 6th, 2008 @ 05:20 PM

When using only on a hash with a missing key it will add all keys regardless of the current existence of each passable key.

    {}.only(:foo) #=> {:foo => nil}

Comments and changes to this ticket

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 »

Attachments