From 7bbf2f308580f468802cd7d32c94fce1b9f1779e Mon Sep 17 00:00:00 2001 From: drbrain Date: Wed, 18 May 2011 21:19:18 +0000 Subject: * lib: Convert tabs to spaces for ruby files per http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/generic.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/uri/generic.rb') 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 -- cgit v1.2.3