From 3866715356f5016c0836fdd48b94e90fd88bd704 Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 22 Oct 2017 02:03:49 +0000 Subject: Dir.glob with FNM_EXTGLOB is optimized [Feature #13873] The order of resulted array is changed in some cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/core/dir/shared/glob.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/ruby/core/dir') diff --git a/spec/ruby/core/dir/shared/glob.rb b/spec/ruby/core/dir/shared/glob.rb index d2201cd6cd..11ace13326 100644 --- a/spec/ruby/core/dir/shared/glob.rb +++ b/spec/ruby/core/dir/shared/glob.rb @@ -221,12 +221,12 @@ describe :dir_glob, shared: true do it "respects the order of {} expressions, expanding left most first" do files = Dir.send(@method, "brace/a{.js,.html}{.erb,.rjs}") - files.should == %w!brace/a.js.rjs brace/a.html.erb! + files.sort.should == %w!brace/a.html.erb brace/a.js.rjs! end it "respects the optional nested {} expressions" do files = Dir.send(@method, "brace/a{.{js,html},}{.{erb,rjs},}") - files.should == %w!brace/a.js.rjs brace/a.js brace/a.html.erb brace/a.erb brace/a! + files.sort.should == %w!brace/a brace/a.erb brace/a.html.erb brace/a.js brace/a.js.rjs! end it "matches special characters by escaping with a backslash with '\\'" do -- cgit v1.2.3