Work around possible mutable data issue #501

This commit is contained in:
Thomas Reynolds 2014-05-22 19:20:43 +09:00
parent dc33f6b3fa
commit 610716ee80

View file

@ -222,6 +222,10 @@ module Middleman
def render_individual_file(path, locs={}, opts={}, context=self, &block) def render_individual_file(path, locs={}, opts={}, context=self, &block)
path = path.to_s 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 # Detect the remdering engine from the extension
extension = File.extname(path) extension = File.extname(path)
engine = extension[1..-1].to_sym engine = extension[1..-1].to_sym