Skip to content

Commit

Permalink
Merge pull request #1580 from tk0miya/update_types_for_URI.join
Browse files Browse the repository at this point in the history
stdlib: Update type for URI.join
  • Loading branch information
soutaro authored Oct 30, 2023
2 parents d090d9a + d35c8c5 commit 9ed2e11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 9ed2e11

Please sign in to comment.