diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ext/openssl/lib/openssl/buffering.rb | 8 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,9 @@ +Mon Oct 15 17:28:20 2007 NAKAMURA Usaku <usa@ruby-lang.org> + + * 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] + Mon Oct 15 11:45:12 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * marshal.c (r_bytes0): refined length check. [ruby-dev:32059] 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 |