diff options
Diffstat (limited to 'lib/openssl')
-rw-r--r-- | lib/openssl/buffering.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/openssl/buffering.rb b/lib/openssl/buffering.rb index 116179d2..d47e1082 100644 --- a/lib/openssl/buffering.rb +++ b/lib/openssl/buffering.rb @@ -99,16 +99,6 @@ module OpenSSL::Buffering end end - if "".respond_to?(:unpack1) - def unpack_byte(str) - str.unpack1("C") - end - else - def unpack_byte(str) - str.unpack("C").first - end - end - public # call-seq: @@ -117,7 +107,7 @@ module OpenSSL::Buffering # Get the next 8bit byte from `ssl`. Returns `nil` on EOF def getbyte byte = read(1) - byte && unpack_byte(byte) + byte && byte.unpack1("C") end ## |