diff --git a/ChangeLog b/ChangeLog index 527149d134..0ed53c3aa9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 8 23:26:11 2011 NAKAMURA Usaku + + * 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 * ext/extmk.rb (extract_makefile): need to sort the array of current diff --git a/ext/extmk.rb b/ext/extmk.rb index ca32da30c6..0eb9d0a10f 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