diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-18 21:19:18 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-18 21:19:18 +0000 |
commit | 7bbf2f308580f468802cd7d32c94fce1b9f1779e (patch) | |
tree | 0a680f59e70a78d60e776d7b763e618fb2fec624 /lib/uri/generic.rb | |
parent | 34276148c4450faa77bb298cfbe005f7c263f802 (diff) |
* 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
Diffstat (limited to 'lib/uri/generic.rb')
-rw-r--r-- | lib/uri/generic.rb | 14 |
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 |