Skip to content

Commit 7f62151

Browse files
committed
RUBY-1048 String#bytes on JRuby and MRI < 2.0 return an Enumerator
1 parent 285e632 commit 7f62151

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongo/socket/ssl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def initialize(host, port, host_name, timeout, family, options = {})
9494
# @since 2.0.0
9595
def readbyte
9696
handle_errors do
97-
byte = socket.read(1).bytes[0]
97+
byte = socket.read(1).bytes.to_a[0]
9898
byte.nil? ? raise(EOFError) : byte
9999
end
100100
end

0 commit comments

Comments
 (0)