diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-17 14:15:03 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-17 14:15:03 +0000 |
commit | e37aab94da5b0a333b9986826b2b656efe8c5f3c (patch) | |
tree | c6ef008211a77ae9e9cff947c2133f240b3874fd /test/uri | |
parent | f5e06db39c42cbd4b98aebb6d971acf2cc086619 (diff) |
* lib/uri/rfc3986_parser.rb: specify a regexp for :OPAQUE; generic.rb
assumes it is present, and will refuse all values otherwise.
by Matthew Draper <matthew@trebex.net>
https://github.com/ruby/ruby/pull/718 fix GH-718
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/uri')
-rw-r--r-- | test/uri/test_generic.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb index 72769add7e..0202008d44 100644 --- a/test/uri/test_generic.rb +++ b/test/uri/test_generic.rb @@ -730,6 +730,11 @@ class URI::TestGeneric < Test::Unit::TestCase assert_raise(URI::InvalidURIError) { uri.port = 'bar' } assert_raise(URI::InvalidURIError) { uri.path = 'bar' } assert_raise(URI::InvalidURIError) { uri.query = 'bar' } + + uri = URI.parse('foo:bar') + assert_raise(URI::InvalidComponentError) { uri.opaque = '/baz' } + uri.opaque = 'xyzzy' + assert_equal('foo:xyzzy', uri.to_s) end def test_set_scheme |