From 610716ee805c642879679991138fd73fb756ecc7 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Thu, 22 May 2014 19:20:43 +0900 Subject: [PATCH] Work around possible mutable data issue #501 --- .../lib/middleman-core/core_extensions/rendering.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/middleman-core/lib/middleman-core/core_extensions/rendering.rb b/middleman-core/lib/middleman-core/core_extensions/rendering.rb index 2b5347a9..a6b21fdd 100644 --- a/middleman-core/lib/middleman-core/core_extensions/rendering.rb +++ b/middleman-core/lib/middleman-core/core_extensions/rendering.rb @@ -222,6 +222,10 @@ module Middleman def render_individual_file(path, locs={}, opts={}, context=self, &block) path = path.to_s + # Mutability is FUN! + # Try to work around: https://github.com/middleman/middleman/issues/501 + locs = locs.dup + # Detect the remdering engine from the extension extension = File.extname(path) engine = extension[1..-1].to_sym