From 952de171c01cb1e96245bc0263884dd8655fd644 Mon Sep 17 00:00:00 2001 From: Sorah Fukumori Date: Mon, 13 Nov 2023 07:57:04 +0900 Subject: [PATCH] make-snapshot: update RUBY_PATCHLEVEL_STR regexp the regexp to replace RUBY_PATCHLEVEL_STR for prerelease snapshots doesn't match since GH-8578. follow-up: https://github.com/ruby/ruby/pull/8578 follow-up: 68df43788dc237a1071f02b2d82768f844696315 --- tool/make-snapshot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/make-snapshot b/tool/make-snapshot index 154ee89b4c..7446f18578 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -364,7 +364,7 @@ def package(vcs, rev, destdir, tmp = nil) end elsif prerelease versionhdr ||= IO.read("#{v}/version.h") - versionhdr.sub!(/^\#define\s+RUBY_PATCHLEVEL_STR\s+"\K.+?(?=")/, tag) + versionhdr.sub!(/^\#\s*define\s+RUBY_PATCHLEVEL_STR\s+"\K.+?(?=")/, tag) or raise "no match of RUBY_PATCHLEVEL_STR to replace" IO.write("#{v}/version.h", versionhdr) else tag ||= vcs.revision_name(revision)