From d70762f5777cbb455904f3bca5c52a545355acb3 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 15 Oct 2007 08:29:08 +0000 Subject: * ext/openssl/lib/openssl/buffering.rb (read, readpartial): revert r12496. handling EOF is a little differnt in ruby 1.8 and ruby 1.9. [ruby-dev:31979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/lib/openssl/buffering.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/openssl') diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb index 8800aa53cc..761a017487 100644 --- a/ext/openssl/lib/openssl/buffering.rb +++ b/ext/openssl/lib/openssl/buffering.rb @@ -57,10 +57,10 @@ module Buffering if size == 0 if buf buf.clear - return buf else - return "" + buf = "" end + return @eof ? nil : buf end until @eof break if size && size <= @rbuffer.size @@ -78,10 +78,10 @@ module Buffering if maxlen == 0 if buf buf.clear - return buf else - return "" + buf = "" end + return @eof ? nil : buf end if @rbuffer.empty? begin -- cgit v1.2.3