summaryrefslogtreecommitdiff
path: root/test/uri/test_generic.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-11 22:11:07 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-11 22:11:07 +0000
commit655738577ffd90df3796c73afd8be84cd89091f6 (patch)
tree596aa53f8c7b6569337911f0cf22b1e43a723193 /test/uri/test_generic.rb
parentea9b6997cc8bcb70ea82cb0535d1a4b5a5fd5508 (diff)
* lib/uri/generic.rb (module URI): URI now downcases the scheme to
follow RFC 2396 section 3.1. [ruby-trunk - Feature #4551] * test/uri/test_generic.rb (class URI): Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/uri/test_generic.rb')
-rw-r--r--test/uri/test_generic.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb
index 2c9bdd00fa..e0ab049122 100644
--- a/test/uri/test_generic.rb
+++ b/test/uri/test_generic.rb
@@ -708,6 +708,12 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_raise(URI::InvalidURIError) { uri.query = 'bar' }
end
+ def test_set_scheme
+ uri = URI.parse 'HTTP://example'
+
+ assert_equal 'http://example', uri.to_s
+ end
+
def test_ipv6
assert_equal("[::1]", URI("http://[::1]/bar/baz").host)
assert_equal("::1", URI("http://[::1]/bar/baz").hostname)