diff options
Diffstat (limited to 'ext/openssl/lib/openssl/buffering.rb')
-rw-r--r-- | ext/openssl/lib/openssl/buffering.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 |