Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addressable: URI#query_values= supports Array[[String, String]] #722

Merged

Conversation

rossta
Copy link
Contributor

@rossta rossta commented Nov 13, 2024

Adds a missing method overload signature for Addressable::URI#query_values=.

This change supports the ability to set query values as an array of string tuples, like the examples below:

uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']]
uri.query
# => "a=a&b=c&b=d&b=e"
uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]]
uri.query
# => "a=a&b=c&b=d&b=e"
uri.query_values = [['flag'], ['key', 'value']]
uri.query
# => "flag&key=value"

For more information https://www.rubydoc.info/gems/addressable/Addressable/URI#query_values=-instance_method

Addressable::URI#query_values= additionally supports arguments given as
an Array of Arrays, where the values of the inner Arrays may be Strings
or Arrays of Strings.

For more information:
https://www.rubydoc.info/gems/addressable/Addressable/URI#query_values=-instance_method
Copy link

@rossta Thanks for your contribution!

Please follow the instructions below for each change.
See also: https://github.com/ruby/gem_rbs_collection/blob/main/docs/CONTRIBUTING.md

Available commands

You can use the following commands by commenting on this PR.

  • /merge: Merge this PR if CI passes

addressable

You changed RBS files for an existing gem.
This gem does not have reviewers. So you can merge this PR immediately if the CI passes.
We recommend you add yourself to the reviewers for this gem.

@rossta
Copy link
Contributor Author

rossta commented Nov 13, 2024

/merge

@github-actions github-actions bot merged commit 0c458c0 into ruby:main Nov 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant