diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-15 08:29:08 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-15 08:29:08 +0000 |
commit | d70762f5777cbb455904f3bca5c52a545355acb3 (patch) | |
tree | 76ff17bda25ea32caf6232c47f5a9749232be3cd /ext | |
parent | 82e25d333807accc280d3d03486dfdec4184bf6b (diff) |
* 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
Diffstat (limited to 'ext')
-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 |