diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-08 14:28:28 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-08 14:28:28 +0000 |
commit | f6a2a4311647d2dd4d90c012cc3128eac96e255b (patch) | |
tree | 414642a680b97691393a7d3ef04f1574ae557278 | |
parent | 63fe8b697cd886beecb06f4020cab58676aa2a80 (diff) | |
download | ruby-f6a2a4311647d2dd4d90c012cc3128eac96e255b.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | ext/extmk.rb | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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 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 |