summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-12-11 08:34:04 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-12-14 12:51:58 -0800
commit3303794107f18d1707add305bec6245aabf4ad17 (patch)
tree48fdf735d91574b89c53b8b06e2cf798f0b7e915 /lib
parent6824d3bcc044d74d7287aabf63d6772f96e17adf (diff)
downloadchef-3303794107f18d1707add305bec6245aabf4ad17.tar.gz
stop mutating the default array
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/resource/file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb
index 883b0132d0..827951b83a 100644
--- a/lib/chef/resource/file.rb
+++ b/lib/chef/resource/file.rb
@@ -58,7 +58,7 @@ class Chef
property :atomic_update, [ true, false ], desired_state: false, default: Chef::Config[:file_atomic_update]
property :force_unlink, [ true, false ], desired_state: false, default: false
property :manage_symlink_source, [ true, false ], desired_state: false
- property :verifications, Array, default: []
+ property :verifications, Array, default: lazy { Array.new }
def verify(command=nil, opts={}, &block)
if ! (command.nil? || [String, Symbol].include?(command.class))