diff options
author | Simon Jefford <simon.jefford@gmail.com> | 2010-05-16 01:22:30 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-16 15:05:07 +0200 |
commit | f58bdae1f716c71202546c5a40a951b5fc54a591 (patch) | |
tree | 2137defacc529f1f35c6eb85967e8ec83a6cb5c9 /actionpack/lib | |
parent | 4ea48f2a9880508a4967be011345fc05570f44c4 (diff) | |
download | rails-f58bdae1f716c71202546c5a40a951b5fc54a591.tar.gz rails-f58bdae1f716c71202546c5a40a951b5fc54a591.tar.bz2 rails-f58bdae1f716c71202546c5a40a951b5fc54a591.zip |
Check blocks are not incorrectly detected when compiling erubis templates [#4575 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/template/handlers/erb.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/actionpack/lib/action_view/template/handlers/erb.rb index 705c2bf82e..237746437a 100644 --- a/actionpack/lib/action_view/template/handlers/erb.rb +++ b/actionpack/lib/action_view/template/handlers/erb.rb @@ -28,7 +28,7 @@ module ActionView src << "@output_buffer.safe_concat('" << escape_text(text) << "');" end - BLOCK_EXPR = /(do|\{)(\s*\|[^|]*\|)?\s*\Z/ + BLOCK_EXPR = /\s+(do|\{)(\s*\|[^|]*\|)?\s*\Z/ def add_expr_literal(src, code) if code =~ BLOCK_EXPR |