ruby-changes:36772
From: normal <ko1@a...>
Date: Tue, 16 Dec 2014 05:45:12 +0900 (JST)
Subject: [ruby-changes:36772] normal:r48853 (trunk): tool/vcs.rb: fix Ruby 1.8 compatibility
normal 2014-12-16 05:44:54 +0900 (Tue, 16 Dec 2014) New Revision: 48853 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48853 Log: tool/vcs.rb: fix Ruby 1.8 compatibility Symbol#to_proc is not standard in Ruby 1.8 Modified files: trunk/ChangeLog trunk/tool/vcs.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 48852) +++ ChangeLog (revision 48853) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Dec 16 05:41:46 2014 Eric Wong <e@8...> + + * tool/vcs.rb: fix Ruby 1.8 compatibility + Mon Dec 15 17:51:28 2014 Koichi Sasada <ko1@a...> * ext/objspace/objspace.c: ObjectSpace.memsize_of(obj) returns Index: tool/vcs.rb =================================================================== --- tool/vcs.rb (revision 48852) +++ tool/vcs.rb (revision 48853) @@ -93,8 +93,9 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L93 if modified /\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 } begin - modified = Time.new(*$~[1..6].map(&:to_i), ($7 ? "#{$7}:#{$8}" : "+00:00")) + modified = Time.new(*match, ($7 ? "#{$7}:#{$8}" : "+00:00")) rescue ArgumentError modified = Time.utc(*$~[1..6]) + $7.to_i * 3600 + $8.to_i * 60 end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/