From 72aa8e2e9a63e603199dc8dfe1bcfd0c559d73d2 Mon Sep 17 00:00:00 2001 From: Krzysztof Rybka Date: Thu, 14 Sep 2023 22:40:30 +0100 Subject: [PATCH] Use skip instead of scan in lex_line_comment --- lib/lrama/lexer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lrama/lexer.rb b/lib/lrama/lexer.rb index 2323f493..18fca02c 100644 --- a/lib/lrama/lexer.rb +++ b/lib/lrama/lexer.rb @@ -323,7 +323,7 @@ def lex_comment(ss, line, lines, str) def lex_line_comment(ss, line, str) while !ss.eos? do case - when ss.scan(/\n/) + when ss.skip(/\n/) return line + 1 else str << ss.getch