mruby-compiler/mrbgem.rake: fix regexp pattern; close #5591

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-12-07 23:57:32 +09:00
parent 9935cf1aef
commit 47092ccfa5
+1 -1
View File
@@ -32,7 +32,7 @@ if MRuby::Build.current.name == "host"
def replace_line_directive(path)
content = File.read(path).gsub(%r{
^\#line\s+\d+\s+"\K.*$ | # #line directive
^\#line\s+\d+\s+"\K.*(?="$) | # #line directive
^/\*\s+Command-line:.*\s\K\S+(?=\s+\*/$) # header comment in lex.def
}x, &:relative_path)
File.write(path, content)