From 655738577ffd90df3796c73afd8be84cd89091f6 Mon Sep 17 00:00:00 2001 From: drbrain Date: Wed, 11 Apr 2012 22:11:07 +0000 Subject: * 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 --- test/uri/test_generic.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/uri') 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) -- cgit v1.2.3