Ordering of require with globs

Does requiring globs (`require “./things/*”) guarantee that the files will be required in Unicode order?

(FWIW, I don’t think requiring globs is a good idea in general, but it can be pretty handy in moderation)

Yes, files in the same directory are required by the order of their name (compared with String#<=>).

1 Like

Just to add, the sort done is a crude code-point comparison, so the locale doesn’t affect the sort order.


 "á" > "z"  => true