From f50af1d9364c9b111a29604562d7ba5db82f9229 Mon Sep 17 00:00:00 2001 From: Scott Holden Date: Thu, 20 Feb 2014 13:20:38 -0800 Subject: [PATCH] Fix template cache memory leak --- lib/sinatra/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index a17929f86f..d4b0f68d6a 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -809,7 +809,7 @@ def render(engine, data, options = {}, locals = {}, &block) # render layout if layout - options.merge!(:views => views, :layout => false, :eat_errors => eat_errors, :scope => scope). + options = options.merge(:views => views, :layout => false, :eat_errors => eat_errors, :scope => scope). merge!(layout_options) catch(:layout_missing) { return render(layout_engine, layout, options, locals) { output } } end