diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-12-17 08:57:33 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-12-17 08:57:33 -0800 |
commit | 06c650886daa2a6eaf4c029cbf686ff401d44c48 (patch) | |
tree | 414a5bc2f8c7a5f07702a01c3fcb71b67026f189 /lib/chef/util/dsc | |
parent | df9b3881518297274bebfac3c348d69f3de52197 (diff) | |
download | chef-06c650886daa2a6eaf4c029cbf686ff401d44c48.tar.gz |
Simplify file readssimplified_read
This is a new RuboCop cop that moves things to file.read an file.binread vs. an open and then a read.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/util/dsc')
-rw-r--r-- | lib/chef/util/dsc/configuration_generator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/util/dsc/configuration_generator.rb b/lib/chef/util/dsc/configuration_generator.rb index 8ca6249a9d..ae3c5c951d 100644 --- a/lib/chef/util/dsc/configuration_generator.rb +++ b/lib/chef/util/dsc/configuration_generator.rb @@ -175,7 +175,7 @@ class Chef::Util::DSC end def get_configuration_document(document_path) - ::File.open(document_path, "rb", &:read) + ::File.binread(document_path) end end end |