summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2020-03-18 13:08:28 -0400
committerBryan McLellan <btm@loftninjas.org>2020-03-18 13:08:28 -0400
commit3aef6663aa03aec531fdecbd3b73f7c88d9a63e8 (patch)
tree86c140c0a5ba2f5d982dc67e558317c3f9d0499f
parentfd25a997a5ad5df540f84d4f5b241947d5f22071 (diff)
downloadchef-3aef6663aa03aec531fdecbd3b73f7c88d9a63e8.tar.gz
Add missing yaml require to Chef::Recipe
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
-rw-r--r--lib/chef/recipe.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb
index 936b1ac9d7..890edc6d13 100644
--- a/lib/chef/recipe.rb
+++ b/lib/chef/recipe.rb
@@ -17,6 +17,7 @@
# limitations under the License.
#
+require "yaml"
require_relative "dsl/recipe"
require_relative "mixin/from_file"
require_relative "mixin/deprecation"
@@ -89,7 +90,7 @@ class Chef
self.source_file = filename
if File.file?(filename) && File.readable?(filename)
yaml_contents = IO.read(filename)
- if YAML.load_stream(yaml_contents).length > 1
+ if ::YAML.load_stream(yaml_contents).length > 1
raise ArgumentError, "YAML recipe '#{filename}' contains multiple documents, only one is supported"
end