mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Treat RUBY_REVISION as an integer on old rubies
This commit is contained in:
parent
dd032a5fb4
commit
6454808c52
1 changed files with 8 additions and 4 deletions
|
@ -293,10 +293,14 @@ def package(vcs, rev, destdir, tmp = nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
open("#{v}/revision.h", "wb") {|f|
|
open("#{v}/revision.h", "wb") {|f|
|
||||||
short = vcs.short_revision(revision)
|
if revision.length <= 6 && revision.to_i.to_s == revision
|
||||||
f.puts "#define RUBY_REVISION #{short.inspect}"
|
f.puts "#define RUBY_REVISION #{revision.to_i}"
|
||||||
unless short == revision
|
else
|
||||||
f.puts "#define RUBY_FULL_REVISION #{revision.inspect}"
|
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
|
end
|
||||||
}
|
}
|
||||||
version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1]
|
version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1]
|
||||||
|
|
Loading…
Add table
Reference in a new issue