From 2c9dce46ef8eeafbaef64f89525a945fafa6165b Mon Sep 17 00:00:00 2001 From: Benedict Eastaugh Date: Mon, 18 Jan 2010 13:32:20 +0000 Subject: [PATCH] Instance variable names are always symbols in Ruby 1.9. This patch stops the @staticmatic scope variable from being reset incorrectly. --- lib/staticmatic/mixins/render.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/staticmatic/mixins/render.rb b/lib/staticmatic/mixins/render.rb index a0e9e89..86250c6 100644 --- a/lib/staticmatic/mixins/render.rb +++ b/lib/staticmatic/mixins/render.rb @@ -16,7 +16,7 @@ module StaticMatic::RenderMixin begin # clear all scope variables except @staticmatic @scope.instance_variables.each do |var| - @scope.instance_variable_set(var, nil) unless var == ('@staticmatic' || :@staticmatic) + @scope.instance_variable_set(var, nil) unless var == '@staticmatic' || var == :@staticmatic end html = generate_html_from_template_source(File.read(full_file_path)) -- 1.6.4.3