summaryrefslogtreecommitdiff
path: root/ext/openssl/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r--ext/openssl/lib/openssl/buffering.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb
index 116179d21f..d47e1082ef 100644
--- a/ext/openssl/lib/openssl/buffering.rb
+++ b/ext/openssl/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
##