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

stdlib: Update type for URI.join #1580

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/uri/0/common.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ module URI
# URI.join('http://example.com', '/foo/', 'bar')
# # => #<URI::HTTP http://example.com/foo/bar>
#
def self.join: (String str, *String strs) -> URI::Generic
def self.join: (_ToStr | URI::Generic str, *_ToStr | URI::Generic strs) -> URI::Generic

# <!--
# rdoc-file=lib/uri/common.rb
Expand Down
2 changes: 2 additions & 0 deletions test/stdlib/URI_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def test_join
URI, :join, "http://example.com"
assert_send_type "(String, String) -> URI::Generic",
URI, :join, "http://example.com", "foo"
assert_send_type "(URI::Generic, URI::Generic) -> URI::Generic",
URI, :join, URI("http://example.com"), URI("foo")
end

def test_parse
Expand Down