ruby-changes:43843
From: nagachika <ko1@a...>
Date: Tue, 16 Aug 2016 11:49:06 +0900 (JST)
Subject: [ruby-changes:43843] nagachika:r55916 (ruby_2_3): merge revision(s) 55563: [Backport #12498]
nagachika 2016-08-16 11:48:59 +0900 (Tue, 16 Aug 2016) New Revision: 55916 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55916 Log: merge revision(s) 55563: [Backport #12498] * lib/uri/mailto.rb (initialize): RFC3986_Parser#split sets opaque only if the URI has path-rootless, not path-empty. [ruby-core:76055] [Bug #12498] patched by Chris Heisterkamp <cheister@s...> Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/lib/uri/mailto.rb branches/ruby_2_3/test/uri/test_mailto.rb branches/ruby_2_3/version.h Index: ruby_2_3/lib/uri/mailto.rb =================================================================== --- ruby_2_3/lib/uri/mailto.rb (revision 55915) +++ ruby_2_3/lib/uri/mailto.rb (revision 55916) @@ -136,6 +136,9 @@ module URI https://github.com/ruby/ruby/blob/trunk/ruby_2_3/lib/uri/mailto.rb#L136 @to = nil @headers = [] + # The RFC3986 parser does not normally populate opaque + @opaque = "?#{@query}" if @query && !@opaque + unless @opaque raise InvalidComponentError, "missing opaque part for mailto URL" Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 55915) +++ ruby_2_3/version.h (revision 55916) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.2" #define RUBY_RELEASE_DATE "2016-08-16" -#define RUBY_PATCHLEVEL 163 +#define RUBY_PATCHLEVEL 164 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 8 Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 55915) +++ ruby_2_3/ChangeLog (revision 55916) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Tue Aug 16 11:46:07 2016 NARUSE, Yui <naruse@r...> + + * lib/uri/mailto.rb (initialize): RFC3986_Parser#split sets opaque + only if the URI has path-rootless, not path-empty. + [ruby-core:76055] [Bug #12498] + patched by Chris Heisterkamp <cheister@s...> + Tue Aug 16 04:57:28 2016 Shugo Maeda <shugo@r...> * lib/net/http/generic_request.rb (write_header): A Request-Line must Index: ruby_2_3/test/uri/test_mailto.rb =================================================================== --- ruby_2_3/test/uri/test_mailto.rb (revision 55915) +++ ruby_2_3/test/uri/test_mailto.rb (revision 55916) @@ -112,13 +112,15 @@ class TestMailTo < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/uri/test_mailto.rb#L112 bad << ["foo@e...?subject=1+1=2", []] ok.each do |x| - assert_equal(x[0], - @u.build(x[1]).to_s) - assert_equal(x[0], - @u.build(x[2]).to_s) + assert_equal(x[0], URI.parse(x[0]).to_s) + assert_equal(x[0], @u.build(x[1]).to_s) + assert_equal(x[0], @u.build(x[2]).to_s) end bad.each do |x| + assert_raise(URI::InvalidURIError) { + URI.parse(x) + } assert_raise(URI::InvalidComponentError) { @u.build(x) } Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r55563 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/