amakawa / redic

Lightweight Redis Client
MIT License
120 stars 14 forks source link

Error in 1.5.2 #16

Closed Szpajo closed 5 years ago

Szpajo commented 5 years ago

Can you check your code? gems/redic-1.5.2/lib/redic/client.rb:37: syntax error, unexpected keyword_rescue, expecting keyword_end (SyntaxError)

soveran commented 5 years ago

Hello @Szpajo, can you tell me which Ruby version you are using? The code works fine for me with Ruby 2.6.

Szpajo commented 5 years ago

Hi @soveran we are using different versions: 2.3.3 and also 1.9.3. In both there is this error so we have set redic to version 1.5.1.

soveran commented 5 years ago

@Szpajo Perfect, I've found the error! The problem was that in older Ruby versions, a function definition can't have a rescue statement, so a begin/end block is mandatory. I've just released version 1.5.3 which should work with the Ruby versions you are using. Let me know how it goes!

Szpajo commented 5 years ago

@soveran Thank you! Version 1.5.3 works now in our ruby versions.

soveran commented 5 years ago

Excellent, thanks for reporting the error!