1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Revert "Treat RUBY_REVISION as an integer on old rubies"

This reverts commit 6454808c52.

It is no longer needed, as `VCS::SVN#get_revisions` now returns
`Integer` as revision numbers, and `short_revision` should deal
with it.
This commit is contained in:
Nobuyoshi Nakada 2019-08-28 16:34:17 +09:00
parent b11d739444
commit c1d0b6adfc
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -293,14 +293,10 @@ def package(vcs, rev, destdir, tmp = nil)
end
open("#{v}/revision.h", "wb") {|f|
if revision.is_a?(Integer)
f.puts "#define RUBY_REVISION #{revision}"
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
short = vcs.short_revision(revision)
f.puts "#define RUBY_REVISION #{short.inspect}"
unless short == revision
f.puts "#define RUBY_FULL_REVISION #{revision.inspect}"
end
}
version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1]