summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-03-12 11:00:30 -0700
committerGitHub <noreply@github.com>2018-03-12 11:00:30 -0700
commit2dbee954492bfefc70d2f83f982e7283141f6bbf (patch)
tree8370f861f6a352f402383cb5a01c827b617e7083
parentbfc799cdb3ab64c18e09a319baa40ff07d23811a (diff)
parent17cc02372c4e8c07014db140cfbadff18bf50146 (diff)
downloadchef-2dbee954492bfefc70d2f83f982e7283141f6bbf.tar.gz
Merge pull request #6976 from chef/rubocop_unfreezestring
Don't use String.new in the cron provider
-rw-r--r--lib/chef/provider/cron.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider/cron.rb b/lib/chef/provider/cron.rb
index c232585c18..2e702d4376 100644
--- a/lib/chef/provider/cron.rb
+++ b/lib/chef/provider/cron.rb
@@ -95,8 +95,8 @@ class Chef
end
def action_create
- crontab = String.new
- newcron = String.new
+ crontab = ""
+ newcron = ""
cron_found = false
newcron = get_crontab_entry
@@ -156,7 +156,7 @@ class Chef
def action_delete
if @cron_exists
- crontab = String.new
+ crontab = ""
cron_found = false
read_crontab.each_line do |line|
case line.chomp