From 286f7aaa3a1387b689a6a00db705f15b46579ce6 Mon Sep 17 00:00:00 2001 From: Jorie Tappa Date: Wed, 1 Aug 2018 16:09:42 -0500 Subject: Fix Style/RegexpLiteral violations --- lib/puppet/type/cron.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3