* 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:
parent
3fdd33b70c
commit
88695fc0ea
@ -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>
|
Mon Dec 22 20:38:44 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/cgi.rb: reduce eval.
|
* lib/cgi.rb: reduce eval.
|
||||||
|
@ -947,7 +947,7 @@ Object
|
|||||||
self.query, self.fragment)
|
self.query, self.fragment)
|
||||||
|
|
||||||
if rel.userinfo != oth.userinfo ||
|
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.port != oth.port
|
||||||
rel.set_port(nil) if rel.port == oth.default_port
|
rel.set_port(nil) if rel.port == oth.default_port
|
||||||
return rel, rel
|
return rel, rel
|
||||||
|
@ -177,6 +177,9 @@ class TestGeneric < Test::Unit::TestCase
|
|||||||
|
|
||||||
url = URI.parse('http://hoge/a/b/').route_to('http://MOGE/b/')
|
url = URI.parse('http://hoge/a/b/').route_to('http://MOGE/b/')
|
||||||
assert_equal('//MOGE/b/', url.to_s)
|
assert_equal('//MOGE/b/', url.to_s)
|
||||||
|
|
||||||
|
url = URI.parse('file:///a/b/').route_to('file:///a/b/')
|
||||||
|
assert_equal('', url.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_rfc2396_examples
|
def test_rfc2396_examples
|
||||||
|
Loading…
x
Reference in New Issue
Block a user