aboutsummaryrefslogtreecommitdiffstats
path: root/lib/openssl/buffering.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/openssl/buffering.rb')
-rw-r--r--lib/openssl/buffering.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/openssl/buffering.rb b/lib/openssl/buffering.rb
index d0b4b180..85f593af 100644
--- a/lib/openssl/buffering.rb
+++ b/lib/openssl/buffering.rb
@@ -107,6 +107,12 @@ module OpenSSL::Buffering
read(1)&.ord
end
+ # Get the next 8bit byte. Raises EOFError on EOF
+ def readbyte
+ raise EOFError if eof?
+ getbyte
+ end
+
##
# Reads _size_ bytes from the stream. If _buf_ is provided it must
# reference a string which will receive the data.