From b85a79107a7e09d389bdc56f2fd175d2916c07fb Mon Sep 17 00:00:00 2001 From: sorah Date: Thu, 24 Dec 2015 06:35:39 +0000 Subject: [PATCH] * tool/file2lastrev.rb: Fix ArgumentError to work on Ruby 1.8.7. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ tool/file2lastrev.rb | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 807a04a07f..18b2d19bc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Dec 24 15:01:38 2015 sorah (Shota Fukumori) + + * tool/file2lastrev.rb: Fix ArgumentError to work on Ruby 1.8.7. + Thu Dec 24 14:44:08 2015 sorah (Shota Fukumori) * tool/vcs.rb (IO.popen): Enable on Ruby 1.9 where chdir option is not diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb index 13f9a3bd1a..79e6c655ac 100755 --- a/tool/file2lastrev.rb +++ b/tool/file2lastrev.rb @@ -45,11 +45,11 @@ parser.parse! rescue abort "#{File.basename(Program)}: #{$!}\n#{parser}" @output = case @output when :changed, nil - proc {|last, changed| + Proc.new {|last, changed| changed } when :revision_h - proc {|last, changed, modified, branch, title| + Proc.new {|last, changed, modified, branch, title| [ "#define RUBY_REVISION #{changed || 0}", if branch @@ -64,11 +64,11 @@ parser.parse! rescue abort "#{File.basename(Program)}: #{$!}\n#{parser}" ].compact } when :doxygen - proc {|last, changed| + Proc.new {|last, changed| "r#{changed}/r#{last}" } when :modified - proc {|last, changed, modified| + Proc.new {|last, changed, modified| modified.strftime(format) } else