Skip to content

Commit d2cd7ea

Browse files
nobuk0kubun
authored andcommitted
Update rubyspec as of CVE-2025-27221
1 parent 7146266 commit d2cd7ea

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

spec/ruby/library/uri/set_component_spec.rb

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,27 @@
66
it "conforms to the MatzRuby tests" do
77
uri = URI.parse('http://foo:bar@baz')
88
(uri.user = 'oof').should == 'oof'
9-
uri.to_s.should == 'http://oof:bar@baz'
10-
(uri.password = 'rab').should == 'rab'
11-
uri.to_s.should == 'http://oof:rab@baz'
12-
(uri.userinfo = 'foo').should == 'foo'
13-
uri.to_s.should == 'http://foo:rab@baz'
14-
(uri.userinfo = ['foo', 'bar']).should == ['foo', 'bar']
15-
uri.to_s.should == 'http://foo:bar@baz'
16-
(uri.userinfo = ['foo']).should == ['foo']
17-
uri.to_s.should == 'http://foo:bar@baz'
18-
(uri.host = 'zab').should == 'zab'
19-
uri.to_s.should == 'http://foo:bar@zab'
20-
(uri.port = 8080).should == 8080
21-
uri.to_s.should == 'http://foo:bar@zab:8080'
22-
(uri.path = '/').should == '/'
23-
uri.to_s.should == 'http://foo:bar@zab:8080/'
24-
(uri.query = 'a=1').should == 'a=1'
25-
uri.to_s.should == 'http://foo:bar@zab:8080/?a=1'
26-
(uri.fragment = 'b123').should == 'b123'
27-
uri.to_s.should == 'http://foo:bar@zab:8080/?a=1#b123'
9+
version_is(URI::VERSION, "1.0.4") do
10+
uri.to_s.should == 'http://oof@baz'
11+
(uri.password = 'rab').should == 'rab'
12+
uri.to_s.should == 'http://oof:rab@baz'
13+
(uri.userinfo = 'foo').should == 'foo'
14+
uri.to_s.should == 'http://foo@baz'
15+
(uri.userinfo = ['foo', 'bar']).should == ['foo', 'bar']
16+
uri.to_s.should == 'http://foo:bar@baz'
17+
(uri.userinfo = ['foo']).should == ['foo']
18+
uri.to_s.should == 'http://foo@baz'
19+
(uri.host = 'zab').should == 'zab'
20+
uri.to_s.should == 'http://zab'
21+
(uri.port = 8080).should == 8080
22+
uri.to_s.should == 'http://zab:8080'
23+
(uri.path = '/').should == '/'
24+
uri.to_s.should == 'http://zab:8080/'
25+
(uri.query = 'a=1').should == 'a=1'
26+
uri.to_s.should == 'http://zab:8080/?a=1'
27+
(uri.fragment = 'b123').should == 'b123'
28+
uri.to_s.should == 'http://zab:8080/?a=1#b123'
29+
end
2830

2931
uri = URI.parse('http://example.com')
3032
-> { uri.password = 'bar' }.should raise_error(URI::InvalidURIError)

0 commit comments

Comments
 (0)