From cd0ac59dd36fc515e3667ab462fe8c4424b5928a Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 1 Mar 2017 00:05:54 +0900 Subject: Newlines in strings should be counted; fix #3477 --- mrbgems/mruby-compiler/core/parse.y | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 1203393bf..6548eb18c 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -4069,6 +4069,10 @@ parse_string(parser_state *p) return tSTRING_MID; } } + if (c == '\n') { + p->lineno++; + p->column = 0; + } tokadd(p, c); } -- cgit v1.2.3