/usr/lib/ruby/vendor_ruby/chef_compat/monkeypatches/chef/property.rb is in ruby-compat-resource 12.10.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # 12.9 introduced a new optional parameter to `get()` to avoid a nil-set warning.
# We need to mimick it here.
if Chef::VERSION.to_f >= 12.5 && Chef::VERSION.to_f <= 12.8
require 'chef/property'
class Chef
class Property
# 12.9 introduced a new optional parameter to `get()` to avoid a nil-set warning.
# When their method gets called with 2 args, we need to ignore and call with 1.
alias_method :_original_get, :get
def get(resource, *args)
_original_get(resource)
end
end
end
end
|