From d923e58850bf3bdaa444cffa8cadac3a3a1aa1ea Mon Sep 17 00:00:00 2001 From: aamine Date: Wed, 2 Nov 2005 22:58:39 +0000 Subject: [PATCH] * lib/open-uri.rb (open_loop): find_proxy should return nil when proxy does not exist. [ruby-dev:27630] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/open-uri.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7bff558f43..53be8e4f9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 3 07:57:39 2005 Minero Aoki + + * lib/open-uri.rb (open_loop): find_proxy should return nil when + proxy does not exist. [ruby-dev:27630] + Wed Nov 2 20:25:28 2005 Hidetoshi NAGAI * ext/tk/extconf.rb: ext/tk/extconf.rb: change the check parameter diff --git a/lib/open-uri.rb b/lib/open-uri.rb index b57156bbc9..977d2e4439 100644 --- a/lib/open-uri.rb +++ b/lib/open-uri.rb @@ -173,7 +173,7 @@ module OpenURI end case opt_proxy when true - find_proxy = lambda {|u| [u.find_proxy, nil, nil]} + find_proxy = lambda {|u| pxy = u.find_proxy; pxy ? [pxy, nil, nil] : nil} when nil, false find_proxy = lambda {|u| nil} when String