From df9b78171db7aea0d4308a6a993c9712c302f27b Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Wed, 20 Dec 2023 09:59:57 -0600 Subject: [PATCH] attempt to fix ruby 2.7 error - FIXED: Ruby 2.7 error (again) --- lib/mdless/console.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mdless/console.rb b/lib/mdless/console.rb index 8e51e8f..488f878 100644 --- a/lib/mdless/console.rb +++ b/lib/mdless/console.rb @@ -753,7 +753,7 @@ def color_meta(text) m = Regexp.last_match MDLess.log.info('Processing YAML header') begin - MDLess.meta = YAML.load(m['content']).map { |k, v| "#{k.downcase}" => v } + MDLess.meta = YAML.load(m['content']).each_with_object({}) { |(k, v), h| h[k.downcase] = v } rescue Psych::DisallowedClass => e @log.error('Error reading YAML header') @log.error(e)