diff --git a/Gemfile.lock b/Gemfile.lock index 8df4312c0..6a71f3817 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -112,7 +112,7 @@ GEM rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (1.13.0) - ryo.rb (0.5.3) + ryo.rb (0.5.5) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) diff --git a/Rules b/Rules index 7ded24776..697f8d3bd 100644 --- a/Rules +++ b/Rules @@ -5,6 +5,7 @@ # Requires require "ryo" require "ryo/json" +require "ryo/yaml" require "nanoc-gzip" require "nanoc-webpack" require "nanoc-tidy" diff --git a/nanoc/lib/mixin.rb b/nanoc/lib/mixin.rb index 7f9241748..7e2acc8f2 100644 --- a/nanoc/lib/mixin.rb +++ b/nanoc/lib/mixin.rb @@ -48,11 +48,7 @@ module Mixin # @return [Ryo::Object] # Returns the contents of nanoc.yaml as a Ryo object def nanoc - return @nanoc if defined?(@nanoc) - @nanoc = begin - path = File.join(Dir.getwd, "nanoc.yaml") - Ryo.from YAML.load_file(path) - end + @nanoc ||= Ryo.from_yaml(path: File.join(Dir.getwd, "nanoc.yaml")) end include T