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

Ensure the last and changed revisions as Integers

This commit is contained in:
Nobuyoshi Nakada 2019-08-28 12:32:43 +09:00
parent 8e13da1ee8
commit c9dc569a94
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -266,7 +266,7 @@ class VCS
end
def self.short_revision(rev)
Integer(rev)
rev
end
def _get_revisions(path, srcdir = nil)
@ -281,7 +281,7 @@ class VCS
_, last, _, changed, _ = info_xml.split(/revision="(\d+)"/)
modified = info_xml[/<date>([^<>]*)/, 1]
branch = info_xml[%r'<relative-url>\^/(?:branches/|tags/)?([^<>]+)', 1]
[last, changed, modified, branch]
[Integer(last), Integer(changed), modified, branch]
end
def self.search_root(path)