diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-10-13 14:24:53 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-10-16 18:48:30 +0900 |
commit | 3436bd040d8ea6abe71ac883a4254b4c651c0fd5 (patch) | |
tree | 6ae07845dc54e87f01df5c0e98455db605ebb982 /lib | |
parent | baa83a8a579fc85ad72e440387c795029ab33442 (diff) | |
download | ruby-openssl-3436bd040d8ea6abe71ac883a4254b4c651c0fd5.tar.gz |
require Ruby 2.6 or laterky/require-ruby-2.6
Drop support for Ruby 2.3, 2.4, and 2.5.
As of 2021-10, Ruby 2.6 is the oldest version that still receives
security fixes from the Ruby core team, so it doesn't make much sense
to keep code for those ancient versions.
Diffstat (limited to 'lib')
-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 ## |