Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Give parse_query's second argument a default value
  • Loading branch information
spastorino committed Apr 6, 2015
1 parent 6d978cb commit d68b93a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rack/request.rb
Expand Up @@ -371,7 +371,7 @@ def reject_trusted_ip_addresses(ip_addresses)
ip_addresses.reject { |ip| trusted_proxy?(ip) }
end

def parse_query(qs, d)
def parse_query(qs, d='&')
Utils.parse_nested_query(qs, d)
end

Expand Down

6 comments on commit d68b93a

@matthewd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spastorino note this doesn't help compatibility with older Rails -- we're not calling the method: we're overriding it

@spastorino
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthewd yep, anyway both changes are better. Having a default here and using (*) in Rails

@Hermanverschooten
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks capybara for me with rspec and Rails 4.2.1 and 4.2.2.

@spastorino
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hermanverschooten it's probably not this commit, can you give us more information?.

@Hermanverschooten
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, indeed it wasn't this commit. see issue #896, it is the commit that adds the second parameter to parse_query.

@ericboehs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was this commit actually. See PR #781. I have 2 PRs open now that resolves this and the tests still pass.

Please sign in to comment.