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

ruby-changes:21937

From: usa <ko1@a...>
Date: Thu, 8 Dec 2011 23:28:38 +0900 (JST)
Subject: [ruby-changes:21937] usa:r33986 (trunk): * ext/extmk.rb (extract_makefile): should sort after map, not before

usa	2011-12-08 23:28:28 +0900 (Thu, 08 Dec 2011)

  New Revision: 33986

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33986

  Log:
    * ext/extmk.rb (extract_makefile): should sort after map, not before
      it.  in this case there is no difference, but we should write better
      code.  this bad smell was caught by nagachika.

  Modified files:
    trunk/ChangeLog
    trunk/ext/extmk.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33985)
+++ ChangeLog	(revision 33986)
@@ -1,3 +1,9 @@
+Thu Dec  8 23:26:11 2011  NAKAMURA Usaku  <usa@r...>
+
+	* ext/extmk.rb (extract_makefile): should sort after map, not before
+	  it.  in this case there is no difference, but we should write better
+	  code.  this bad smell was caught by nagachika.
+
 Thu Dec  8 22:31:13 2011  NAKAMURA Usaku  <usa@r...>
 
 	* ext/extmk.rb (extract_makefile): need to sort the array of current
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 33985)
+++ ext/extmk.rb	(revision 33986)
@@ -73,7 +73,7 @@
     end
     return false
   end
-  srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")].sort.map {|fn| File.basename(fn)}
+  srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")].map {|fn| File.basename(fn)}.sort
   if !srcs.empty?
     old_srcs = m[/^ORIG_SRCS[ \t]*=[ \t](.*)/, 1] or return false
     old_srcs.split.sort == srcs or return false

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

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