diff options
author | Jorie Tappa <jorie@jorietappa.com> | 2018-08-01 16:09:42 -0500 |
---|---|---|
committer | Jorie Tappa <jorie@jorietappa.com> | 2018-08-01 16:13:33 -0500 |
commit | 286f7aaa3a1387b689a6a00db705f15b46579ce6 (patch) | |
tree | a933458cb52f606dbb3715773874fb4a480128a8 /lib | |
parent | 45c0c71d2e3b3b7268a356eea86231a1b35cd4f0 (diff) | |
download | puppet-cron_core-286f7aaa3a1387b689a6a00db705f15b46579ce6.tar.gz puppet-cron_core-286f7aaa3a1387b689a6a00db705f15b46579ce6.tar.bz2 |
Fix Style/RegexpLiteral violations
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/cron.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/type/cron.rb b/lib/puppet/type/cron.rb index 3a106c4..fada980 100644 --- a/lib/puppet/type/cron.rb +++ b/lib/puppet/type/cron.rb @@ -156,8 +156,8 @@ Puppet::Type.newtype(:cron) do return :absent end - # Allow the */2 syntax - if value =~ /^\*\/[0-9]+$/ + # Allow step syntax + if value =~ %r{^\*/[0-9]+$} return value end @@ -166,8 +166,8 @@ Puppet::Type.newtype(:cron) do return value end - # Allow ranges + */2 - if value =~ /^[0-9]+-[0-9]+\/[0-9]+$/ + # Allow ranges with step + if value =~ %r{^[0-9]+-[0-9]+/[0-9]+$} return value end |