From bcc14e25732dc9809f70ed5d03c299308d7053e6 Mon Sep 17 00:00:00 2001 From: AI-Mozi Date: Wed, 10 May 2023 15:18:50 +0200 Subject: [PATCH] add spec for `URI#parse` add ruby_version_is remove trailing space --- library/uri/parse_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/uri/parse_spec.rb b/library/uri/parse_spec.rb index e9ec59b490..6e43d66f95 100644 --- a/library/uri/parse_spec.rb +++ b/library/uri/parse_spec.rb @@ -200,4 +200,10 @@ URI.parse('http://a_b:80/').host.should == "a_b" URI.parse('http://a_b/').host.should == "a_b" end + + ruby_version_is "3.2" do + it "returns empty string in host if is not valid" do + URI.parse('http:////sth.com/path').host.should == '' + end + end end