1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
naruse 2017-10-22 02:03:49 +00:00
parent 72f88ebcc1
commit 3866715356
5 changed files with 90 additions and 13 deletions

View file

@ -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 '\\<character>'" do