aboutsummaryrefslogtreecommitdiffstats
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-16 00:08:14 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-16 00:08:14 +0000
commit9aeb74d0de8004440ddd50f1c20417d44b742ecd (patch)
tree8619d2be11215e50514c65ea75ac18086a1d1c2c /tool/vcs.rb
parent2c2bdb8b51988ffdd0bc3a466b44c6bbe39c6406 (diff)
downloadruby-9aeb74d0de8004440ddd50f1c20417d44b742ecd.tar.gz
tool/vcs.rb: fix Ruby 1.8 compatibility harder
Arguments after splat do not work under 1.8, either. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 8b99533c61..71eb689f0e 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -94,8 +94,10 @@ class VCS
/\A(\d+)-(\d+)-(\d+)\D(\d+):(\d+):(\d+(?:\.\d+)?)\s*(?:Z|([-+]\d\d)(\d\d))\z/ =~ modified or
raise "unknown time format - #{modified}"
match = $~[1..6].map { |x| x.to_i }
+ off = $7 ? "#{$7}:#{$8}" : "+00:00"
+ match << off
begin
- modified = Time.new(*match, ($7 ? "#{$7}:#{$8}" : "+00:00"))
+ modified = Time.new(*match)
rescue ArgumentError
modified = Time.utc(*$~[1..6]) + $7.to_i * 3600 + $8.to_i * 60
end