Ruby 3 changes Dir.glob to sort the results by default. We need to evaluate what the impact will be in Puppet. Most likely it's the correct behavior that we should have been doing all along.
I submitted a topic branch to confirm sorting Dir.glob doesn't produce undesired behavior. That said I don't think there's anything that needs fixing, as we generally want the result to be sorted. For posterity, the branch is https://github.com/joshcooper/puppet/tree/dir_sort