diff --git a/lib/acts_as_enum.rb b/lib/acts_as_enum.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_enum.rb
+++ b/lib/acts_as_enum.rb
@@ -80,7 +80,7 @@ module ActsAsEnum
 
         const_set(method_name.upcase, attr_value)
 
-        if Rails.version =~ /^[34]/
+        if Rails.version =~ /^[345]/
           scope method_name.to_sym, -> { where(attr => attr_value) }
         else
           named_scope method_name.to_sym, :conditions => { attr.to_sym => attr_value }
rails 5 support

it does not work in rails 5, adding 5 support