Skip to content

Commit

Permalink
cache template procs on locals.keys so values can GC
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Mar 3, 2010
1 parent 75a75f3 commit 6cf50bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tilt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def evaluate(scope, locals, &block)

private
def template_proc(locals)
@template_procs[locals] ||= begin
@template_procs[locals.keys] ||= begin
source, offset = local_assignment_code(locals)
source = [source, template_source].join("\n")
instance_eval("proc { #{source} }", eval_file, line - offset)
Expand Down

0 comments on commit 6cf50bd

Please sign in to comment.