From 3485f49f74bddd65470836e9aa3e5f59e26351a6 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 18 Aug 2015 16:22:32 -0700 Subject: [PATCH] Use Hashie Mash for recursive indifferent --- middleman-core/lib/middleman-core/util.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/middleman-core/lib/middleman-core/util.rb b/middleman-core/lib/middleman-core/util.rb index bf1f1755..a444617e 100644 --- a/middleman-core/lib/middleman-core/util.rb +++ b/middleman-core/lib/middleman-core/util.rb @@ -76,10 +76,10 @@ module Middleman end end - class EnhancedHash < ::Hash - include ::Hashie::Extensions::MergeInitializer - include ::Hashie::Extensions::MethodReader - include ::Hashie::Extensions::IndifferentAccess + class EnhancedHash < ::Hashie::Mash + # include ::Hashie::Extensions::MergeInitializer + # include ::Hashie::Extensions::MethodReader + # include ::Hashie::Extensions::IndifferentAccess end # Recursively convert a normal Hash into a EnhancedHash @@ -90,9 +90,9 @@ module Middleman Contract Maybe[Hash] => Maybe[Or[Array, EnhancedHash]] def recursively_enhance(obj) if obj.is_a? ::Array - obj.map { |e| recursively_enhance(e) }.freeze + obj.map { |e| recursively_enhance(e) } elsif obj.is_a? ::Hash - EnhancedHash.new(obj).freeze + ::Hashie::Mash.new(obj) else obj end