[前][次][番号順一覧][スレッド一覧]

ruby-changes:44579

From: nobu <ko1@a...>
Date: Mon, 7 Nov 2016 10:23:08 +0900 (JST)
Subject: [ruby-changes:44579] nobu:r56652 (trunk): make-snapshot: sort globbed results

nobu	2016-11-07 10:23:04 +0900 (Mon, 07 Nov 2016)

  New Revision: 56652

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56652

  Log:
    make-snapshot: sort globbed results
    
    * tool/make-snapshot (package): globbed results order is
      undefined.

  Modified files:
    trunk/tool/make-snapshot
Index: tool/make-snapshot
===================================================================
--- tool/make-snapshot	(revision 56651)
+++ tool/make-snapshot	(revision 56652)
@@ -215,7 +215,7 @@ def package(vcs, rev, destdir, tmp = nil https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L215
   end
 
   # get last revision from previous ChangeLog archive
-  last_ChangeLog = Dir["#{v}/doc/ChangeLog-*"].grep(/-\d+\z/).last
+  last_ChangeLog = Dir["#{v}/doc/ChangeLog-*"].grep(/-(\d+)\z/) {|n| [$1.to_i, n]}.max[1]
   open(last_ChangeLog) do |f|
     f.readline
     unless /\Ar(\d+) / =~ f.readline

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]