summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 14:07:42 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 14:07:42 +0000
commit47f89c982ccd616245d8c4f15d0d0d5067773ef7 (patch)
tree1fc550d00181fc6345b5388f576455d373c9dd67 /ext
parent35c16fe35fd7420ce7d0cd4059a02650ad8d4eb2 (diff)
* 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
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/lib/openssl/buffering.rb5
1 files changed, 2 insertions, 3 deletions
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