summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-08 14:28:28 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-08 14:28:28 +0000
commitf6a2a4311647d2dd4d90c012cc3128eac96e255b (patch)
tree414642a680b97691393a7d3ef04f1574ae557278 /ext/extmk.rb
parent63fe8b697cd886beecb06f4020cab58676aa2a80 (diff)
* 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
Diffstat (limited to 'ext/extmk.rb')
-rwxr-xr-xext/extmk.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index ca32da3..0eb9d0a 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