aboutsummaryrefslogtreecommitdiffstats
path: root/tool/make-snapshot
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2019-08-28 15:57:30 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2019-08-28 15:57:30 +0900
commit2b55df7315ad78a138d877a3a319f86a3d3bfc24 (patch)
tree28923b1a4c3b54ddb4a52df354e3201327e2273b /tool/make-snapshot
parented8d2e1cfdc57bba03065e96424e4ba7df45682e (diff)
downloadruby-2b55df7315ad78a138d877a3a319f86a3d3bfc24.tar.gz
`revision` might be an Integer
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-xtool/make-snapshot4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 1ad6682985..d4863bb79e 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -293,8 +293,8 @@ def package(vcs, rev, destdir, tmp = nil)
end
open("#{v}/revision.h", "wb") {|f|
- if revision.length <= 6 && revision.to_i.to_s == revision
- f.puts "#define RUBY_REVISION #{revision.to_i}"
+ if revision.is_a?(Integer)
+ f.puts "#define RUBY_REVISION #{revision}"
else
short = vcs.short_revision(revision)
f.puts "#define RUBY_REVISION #{short.inspect}"