* lib/uri/generic.rb (URI::Generic#route_from): accepts urls which

has no host-part.

* test/uri/test_generic.rb (TestGeneric::test_route): added a test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akira 2003-12-22 11:49:20 +00:00
Родитель 3fdd33b70c
Коммит 88695fc0ea
3 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Mon Dec 22 20:44:36 2003 akira yamada <akira@ruby-lang.org>
* lib/uri/generic.rb (URI::Generic#route_from): accepts urls which
has no host-part.
* test/uri/test_generic.rb (TestGeneric::test_route): added a test.
Mon Dec 22 20:38:44 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/cgi.rb: reduce eval.

Просмотреть файл

@ -947,7 +947,7 @@ Object
self.query, self.fragment)
if rel.userinfo != oth.userinfo ||
rel.host.downcase != oth.host.downcase ||
rel.host.to_s.downcase != oth.host.to_s.downcase ||
rel.port != oth.port
rel.set_port(nil) if rel.port == oth.default_port
return rel, rel

Просмотреть файл

@ -177,6 +177,9 @@ class TestGeneric < Test::Unit::TestCase
url = URI.parse('http://hoge/a/b/').route_to('http://MOGE/b/')
assert_equal('//MOGE/b/', url.to_s)
url = URI.parse('file:///a/b/').route_to('file:///a/b/')
assert_equal('', url.to_s)
end
def test_rfc2396_examples