[前][次][番号順一覧][スレッド一覧]

ruby-changes:57339

From: NAKAMURA <ko1@a...>
Date: Wed, 28 Aug 2019 00:20:29 +0900 (JST)
Subject: [ruby-changes:57339] NAKAMURA Usaku: 6454808c52 (master): Treat RUBY_REVISION as an integer on old rubies

https://git.ruby-lang.org/ruby.git/commit/?id=6454808c52

From 6454808c52fff445ff09fefb0fb96988f82aaa3c Mon Sep 17 00:00:00 2001
From: NAKAMURA Usaku <usa@r...>
Date: Wed, 28 Aug 2019 00:19:25 +0900
Subject: Treat RUBY_REVISION as an integer on old rubies


diff --git a/tool/make-snapshot b/tool/make-snapshot
index 9199cc2..1ad6682 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -293,10 +293,14 @@ def package(vcs, rev, destdir, tmp = nil) https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L293
   end
 
   open("#{v}/revision.h", "wb") {|f|
-    short = vcs.short_revision(revision)
-    f.puts "#define RUBY_REVISION #{short.inspect}"
-    unless short == revision
-      f.puts "#define RUBY_FULL_REVISION #{revision.inspect}"
+    if revision.length <= 6 && revision.to_i.to_s == revision
+      f.puts "#define RUBY_REVISION #{revision.to_i}"
+    else
+      short = vcs.short_revision(revision)
+      f.puts "#define RUBY_REVISION #{short.inspect}"
+      unless short == revision
+        f.puts "#define RUBY_FULL_REVISION #{revision.inspect}"
+      end
     end
   }
   version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1]
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]