From 47f89c982ccd616245d8c4f15d0d0d5067773ef7 Mon Sep 17 00:00:00 2001 From: nahi Date: Sat, 11 Jun 2011 14:07:42 +0000 Subject: * ext/openssl/lib/openssl/buffering.rb (module OpenSSL): Buffering#each_byte should return String in accordance with IO in 1.9. * test/openssl/test_buffering.rb (class OpenSSL): add tests for getc and each_byte. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/lib/openssl/buffering.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb index a11fe73357..eb39dabcef 100644 --- a/ext/openssl/lib/openssl/buffering.rb +++ b/ext/openssl/lib/openssl/buffering.rb @@ -252,8 +252,7 @@ module OpenSSL::Buffering # file. def getc - c = read(1) - c ? c[0] : nil + read(1) end ## @@ -261,7 +260,7 @@ module OpenSSL::Buffering def each_byte # :yields: byte while c = getc - yield(c) + yield(c.ord) end end -- cgit v1.2.3