From a0a323305d74457c5d3f8d8ffbe645f1ad93a288 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 3 Jun 2008 15:12:03 -0400 Subject: [PATCH] ruby.rl's string and regex literals shouldn't call @code right after '%'. Having @code right after '%' conflicts with rhtml's rhtml_ruby_outry and counts it as a line of Ruby code which is incorrect. --- ext/ohcount_native/ragel_parsers/ruby.rl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/ohcount_native/ragel_parsers/ruby.rl b/ext/ohcount_native/ragel_parsers/ruby.rl index dd9dc35..1b3449e 100644 --- a/ext/ohcount_native/ragel_parsers/ruby.rl +++ b/ext/ohcount_native/ragel_parsers/ruby.rl @@ -87,7 +87,7 @@ enum { # let Ragel know what it is (currently unsupported), and put its respective # closing char in the literal string below. ruby_lit_str = - '%' @code [qQ]? [(\[{] ( + '%' [qQ]? [(\[{] @code ( newline %{ entity = INTERNAL_NL; } %ruby_ccallback | ws @@ -119,7 +119,7 @@ enum { # TODO: true literal array and command detection # See TODO above about literal string detection ruby_lit_other = - '%' @code [wrx] [(\[{] ( + '%' [wrx] [(\[{] @code ( newline %{ entity = INTERNAL_NL; } %ruby_ccallback | ws -- 2.32.0.93.g670b81a890