HeaderHash #[] and #include? problem
Reported by SSDany | August 29th, 2009 @ 07:57 PM
HeaderHash #include? after #[] does not work correctly:
hh = Rack::Utils::HeaderHash.new
#=> {}
hh.include? 'thing'
#=> false
hh['thing']
#=> nil
hh.include? 'thing'
#=> true
because of #[] implementation:
super(@names[k] ||= @names[k.downcase])
Comments and changes to this ticket
-
manveru November 16th, 2009 @ 12:23 AM
- State changed from new to open
- Tag set to headerhash, lookup, patch, performance, utils
- Assigned user set to manveru
Does the attached patch work for you?
-
raggi October 3rd, 2010 @ 07:03 PM
- State changed from open to resolved
- Milestone order changed from 0 to 0
This was fixed by another pull request.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป