From d8e129d973723a31ab451ad4a7d9aaeea54fb4cc Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 6 Apr 2020 20:16:45 -0400 Subject: [PATCH] Add Crystal 0.34 support --- src/lucky_flow/server.cr | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lucky_flow/server.cr b/src/lucky_flow/server.cr index 96eaafc..e8647aa 100644 --- a/src/lucky_flow/server.cr +++ b/src/lucky_flow/server.cr @@ -44,7 +44,13 @@ class LuckyFlow::Server private def start_session driver = Selenium::Webdriver.new Selenium::Session.new(driver, capabilities) - rescue e : Errno + + # If less than 0.34.0 + {% if compare_versions(Crystal::VERSION, "0.34.0") == -1 %} + rescue e : Errno + {% else %} + rescue e : IO::Error + {% end %} retry_start_session(e) end