Skip to content

Commit a760c90

Browse files
committed
Fix SSL compatibility error
1 parent 2a427a1 commit a760c90

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/redis/connection/ruby.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,8 @@ def self.connect(config)
306306
if config[:scheme] == "unix"
307307
raise ArgumentError, "SSL incompatible with unix sockets" if config[:ssl]
308308
sock = UNIXSocket.connect(config[:path], config[:connect_timeout])
309-
elsif config[:ssl] && RUBY_VERSION < "1.9.3"
310-
raise ArgumentError, "This library does not support SSL on Ruby < 1.9"
311309
elsif config[:scheme] == "rediss" || config[:ssl]
310+
raise ArgumentError, "This library does not support SSL on Ruby < 1.9" if RUBY_VERSION < "1.9.3"
312311
sock = SSLSocket.connect(config[:host], config[:port], config[:connect_timeout], config[:ssl_params])
313312
else
314313
sock = TCPSocket.connect(config[:host], config[:port], config[:connect_timeout])

0 commit comments

Comments
 (0)