Skip to content

Commit 9cc9b4f

Browse files
committed
Fail if RUBY_VERSION < 1.9 and SSL is requested
1 parent 9120e31 commit 9cc9b4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/redis/connection/ruby.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +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.0"
310+
raise ArgumentError, "This library does not support SSL on Ruby < 1.9"
309311
elsif config[:scheme] == "rediss" || config[:ssl]
310312
sock = SSLSocket.connect(config[:host], config[:port], config[:connect_timeout], config[:ssl_params])
311313
else

0 commit comments

Comments
 (0)