summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/parse.y3
-rw-r--r--test/t/syntax.rb2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y
index 082b49294..b0e324202 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -4206,6 +4206,9 @@ parser_yylex(parser_state *p)
}
c = nextc(p);
} while (!(c < 0 || isspace(c)));
+ if (c != '\n') skip(p, '\n');
+ p->lineno++;
+ p->column = 0;
goto retry;
}
}
diff --git a/test/t/syntax.rb b/test/t/syntax.rb
index 05d4a15b1..a64000534 100644
--- a/test/t/syntax.rb
+++ b/test/t/syntax.rb
@@ -309,6 +309,6 @@ this is a comment that has extra after =begin and =end with spaces after it
=end
=begin this is a comment
this is a comment that has extra after =begin and =end with tabs after it
-=end
+=end xxxxxxxxxxxxxxxxxxxxxxxxxx
true
end