aboutsummaryrefslogtreecommitdiffstats
path: root/lib/uri/generic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uri/generic.rb')
-rw-r--r--lib/uri/generic.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb
index bd5594fc3c..78e3fc05f7 100644
--- a/lib/uri/generic.rb
+++ b/lib/uri/generic.rb
@@ -174,7 +174,7 @@ module URI
path, opaque,
query,
fragment,
- parser = DEFAULT_PARSER,
+ parser = DEFAULT_PARSER,
arg_check = false)
@scheme = nil
@user = nil
@@ -1321,11 +1321,13 @@ module URI
self.query, self.fragment, parser)
if rel.userinfo != oth.userinfo ||
- rel.host.to_s.downcase != oth.host.to_s.downcase ||
- rel.port != oth.port
- if self.userinfo.nil? && self.host.nil?
- return self, self.dup
- end
+ rel.host.to_s.downcase != oth.host.to_s.downcase ||
+ rel.port != oth.port
+
+ if self.userinfo.nil? && self.host.nil?
+ return self, self.dup
+ end
+
rel.set_port(nil) if rel.port == oth.default_port
return rel, rel
end