ruby-changes:30103
From: nagachika <ko1@a...>
Date: Wed, 24 Jul 2013 22:38:18 +0900 (JST)
Subject: [ruby-changes:30103] nagachika:r42155 (ruby_2_0_0): merge revision(s) 42153: [Backport #8645]
nagachika 2013-07-24 22:38:06 +0900 (Wed, 24 Jul 2013) New Revision: 42155 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42155 Log: merge revision(s) 42153: [Backport #8645] * lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is a relative URI. [Bug #8645] Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/lib/uri/generic.rb branches/ruby_2_0_0/test/uri/test_generic.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 42154) +++ ruby_2_0_0/ChangeLog (revision 42155) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Wed Jul 24 22:35:32 2013 NARUSE, Yui <naruse@r...> + + * lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is + a relative URI. [Bug #8645] + Wed Jul 24 01:13:02 2013 CHIKANAGA Tomoyuki <nagachika@r...> * include/ruby/intern.h (rb_f_lambde): restore the declaration of Index: ruby_2_0_0/lib/uri/generic.rb =================================================================== --- ruby_2_0_0/lib/uri/generic.rb (revision 42154) +++ ruby_2_0_0/lib/uri/generic.rb (revision 42155) @@ -1611,6 +1611,7 @@ module URI https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/uri/generic.rb#L1611 # http_proxy is not used too if the variable is case insensitive. # CGI_HTTP_PROXY can be used instead. def find_proxy + raise BadURIError, "relative URI: #{self}" if self.relative? name = self.scheme.downcase + '_proxy' proxy_uri = nil if name == 'http_proxy' && ENV.include?('REQUEST_METHOD') # CGI? Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 42154) +++ ruby_2_0_0/version.h (revision 42155) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2013-07-24" -#define RUBY_PATCHLEVEL 278 +#define RUBY_PATCHLEVEL 279 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 7 Index: ruby_2_0_0/test/uri/test_generic.rb =================================================================== --- ruby_2_0_0/test/uri/test_generic.rb (revision 42154) +++ ruby_2_0_0/test/uri/test_generic.rb (revision 42155) @@ -736,6 +736,7 @@ class URI::TestGeneric < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/uri/test_generic.rb#L736 # 192.0.2.0/24 is TEST-NET. [RFC3330] def test_find_proxy + assert_raise(URI::BadURIError){ URI("foo").find_proxy } with_env({}) { assert_nil(URI("http://192.0.2.1/").find_proxy) assert_nil(URI("ftp://192.0.2.1/").find_proxy) Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r42153 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/