summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-12-07 23:57:32 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-12-07 23:57:32 +0900
commit47092ccfa5671a239854f50c585d1933d8f833d3 (patch)
tree9b363ed1c9d87dafcc19cc42ff9e0ec9f1810153
parent9935cf1aeffbc0072d93c408a24f287e9d6fe5eb (diff)
downloadmruby-47092ccfa5671a239854f50c585d1933d8f833d3.tar.gz
mruby-47092ccfa5671a239854f50c585d1933d8f833d3.zip
mruby-compiler/mrbgem.rake: fix regexp pattern; close #5591
-rw-r--r--mrbgems/mruby-compiler/mrbgem.rake2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/mrbgem.rake b/mrbgems/mruby-compiler/mrbgem.rake
index be069f386..0f49edea3 100644
--- a/mrbgems/mruby-compiler/mrbgem.rake
+++ b/mrbgems/mruby-compiler/mrbgem.rake
@@ -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)