Skip to content

Commit

Permalink
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 0 additions & 4 deletions truffle/src/main/ruby/core/dir.rb
Original file line number Diff line number Diff line change
@@ -167,10 +167,6 @@ def self.glob(pattern, flags=0, &block)
end
end

# Truffle: ensure glob'd files are always sorted in consistent order,
# it avoids headaches due to platform differences (OS X is sorted, Linux not).
matches.sort!

if block
matches.each(&block)
return nil
7 changes: 6 additions & 1 deletion truffle/src/main/ruby/core/dir_glob.rb
Original file line number Diff line number Diff line change
@@ -320,10 +320,15 @@ def self.single_compile(glob, flags=0)
last
end

def self.run(node, matches=[])
def self.run(node, all_matches=[])
matches = []
env = Environment.new(matches)
node.call env, nil
env.matches
# Truffle: ensure glob'd files are always sorted in consistent order,
# it avoids headaches due to platform differences (OS X is sorted, Linux not).
matches.sort!
all_matches.concat(matches)
end

def self.glob(pattern, flags, matches=[])

0 comments on commit ed13823

Please sign in to comment.