mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove unnecessary sort
Because `Dir.[]` returns the sorted results since Ruby 3.0.
This commit is contained in:
parent
ab3cb29bd9
commit
e142bea799
Notes:
git
2022-04-23 11:59:40 +09:00
1 changed files with 2 additions and 2 deletions
|
@ -2280,7 +2280,7 @@ RULES
|
||||||
RbConfig.expand(srcdir = srcprefix.dup)
|
RbConfig.expand(srcdir = srcprefix.dup)
|
||||||
|
|
||||||
ext = ".#{$OBJEXT}"
|
ext = ".#{$OBJEXT}"
|
||||||
orig_srcs = Dir[File.join(srcdir, "*.{#{SRC_EXT.join(%q{,})}}")].sort
|
orig_srcs = Dir[File.join(srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
|
||||||
if not $objs
|
if not $objs
|
||||||
srcs = $srcs || orig_srcs
|
srcs = $srcs || orig_srcs
|
||||||
$objs = []
|
$objs = []
|
||||||
|
@ -2290,7 +2290,7 @@ RULES
|
||||||
h
|
h
|
||||||
}
|
}
|
||||||
unless objs.delete_if {|b, f| f.size == 1}.empty?
|
unless objs.delete_if {|b, f| f.size == 1}.empty?
|
||||||
dups = objs.sort.map {|b, f|
|
dups = objs.map {|b, f|
|
||||||
"#{b[/.*\./]}{#{f.collect {|n| n[/([^.]+)\z/]}.join(',')}}"
|
"#{b[/.*\./]}{#{f.collect {|n| n[/([^.]+)\z/]}.join(',')}}"
|
||||||
}
|
}
|
||||||
abort "source files duplication - #{dups.join(", ")}"
|
abort "source files duplication - #{dups.join(", ")}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue