Skip to content

Add Net::HTTP::Query to the RBS signature - #357

Open
ksss wants to merge 1 commit into
ruby:masterfrom
ksss:add-http-query-sig
Open

ksss wants to merge 1 commit into
ruby:masterfrom
ksss:add-http-query-sig

Conversation

@ksss

@ksss ksss commented Oct 18, 2026 •

Copy link
Copy Markdown

Summary

#309 (76b11b3) added the HTTP QUERY method: Net::HTTP#query, Net::HTTP#request_query and the Net::HTTP::Query request class. The RBS signature in sig/net-http.rbs gained the two methods but not the class, even though their comments refer to Net::HTTP::Query and Net::HTTP::Query.new(uri) is the documented way to build a QUERY request.

  • Declare Net::HTTP::Query < Net::HTTPRequest next to the other request classes. The comment is exactly what rake rbs:annotate generates for it; the rest of that task's output (rdoc version noise) is left out.
  • Add #query / #request_query assertions to test_sig/test_net_http.rb, mirroring the #post / #request_post ones.

Verification

  • bundle exec rake rbs:test: 30 tests, 0 failures
  • rbs -r net-protocol -r uri -I sig validate: ok

🤖 Generated with Claude Code

76b11b3 added the HTTP `QUERY` method with `Net::HTTP#query`,
`Net::HTTP#request_query` and the `Net::HTTP::Query` request class,
but the RBS signature only gained the two methods. Their comments
refer to `Net::HTTP::Query`, and `Net::HTTP::Query.new(uri)` is
the documented way to build a QUERY request, so declare the class
next to the other request classes.

The comment is what `rake rbs:annotate` generates for the class.
Also cover `#query` and `#request_query` in the RBS tests, mirroring
the `#post` / `#request_post` assertions.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant