summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rwxr-xr-xext/extmk.rb2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 527149d1347..0ed53c3aa91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Dec 8 23:26:11 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* ext/extmk.rb (extract_makefile): need to sort the array of current
diff --git a/ext/extmk.rb b/ext/extmk.rb
index ca32da30c69..0eb9d0a10f8 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -73,7 +73,7 @@ def extract_makefile(makefile, keep = true)
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