diff options
author | makoto kuwata <kwa@kuwata-lab.com> | 2011-02-23 13:40:59 +0900 |
---|---|---|
committer | makoto kuwata <kwa@kuwata-lab.com> | 2011-02-23 13:40:59 +0900 |
commit | c945f51552d10e3b7e8e8525fa43c706e43ec4e1 (patch) | |
tree | 02fad31912e789ba0753e84c62b5b20d9772ae2c | |
parent | c99e4582731fbe3bfcf95a6905cb30d6a39aa94a (diff) | |
download | erubis-c945f51552d10e3b7e8e8525fa43c706e43ec4e1.tar.gz |
[bugfix] 'InterporationEnhancer#_add_text_to_str()' raised null-pointer-exception in a certain case
-rw-r--r-- | lib/erubis/enhancer.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/erubis/enhancer.rb b/lib/erubis/enhancer.rb index 361a582..2fa2862 100644 --- a/lib/erubis/enhancer.rb +++ b/lib/erubis/enhancer.rb @@ -706,8 +706,7 @@ module Erubis def _add_text_to_str(str, text) return if !text || text.empty? - text.gsub!(/[`\#\\]/, '\\\\\&') - str << text + str << text.gsub(/[`\#\\]/, '\\\\\&') end def add_expr_escaped(str, code) |