diff --git a/lib/validate_website/crawl.rb b/lib/validate_website/crawl.rb
index <HASH>..<HASH> 100644
--- a/lib/validate_website/crawl.rb
+++ b/lib/validate_website/crawl.rb
@@ -80,8 +80,10 @@ module ValidateWebsite
         end
 
         if validate?(page)
-          validate(page.doc, page.body, page.url,
-                   options.slice(:ignore, :html5_validator))
+          keys = %i[ignore html5_validator]
+          # slice does not exists on Ruby <= 2.4
+          slice = Hash[[keys, options.values_at(*keys)].transpose]
+          validate(page.doc, page.body, page.url, slice)
         end
       end
     end
diff --git a/lib/validate_website/static.rb b/lib/validate_website/static.rb
index <HASH>..<HASH> 100644
--- a/lib/validate_website/static.rb
+++ b/lib/validate_website/static.rb
@@ -60,8 +60,10 @@ module ValidateWebsite
 
     def check_page(file, page)
       if page.html? && options[:markup]
-        validate(page.doc, page.body, file,
-                 options.slice(:ignore, :html5_validator))
+        keys = %i[ignore html5_validator]
+        # slice does not exists on Ruby <= 2.4
+        slice = Hash[[keys, options.values_at(*keys)].transpose]
+        validate(page.doc, page.body, file, slice)
       end
       check_static_not_found(page.links) if options[:not_found]
     end
Fix build for Ruby <I> and <I>