rubygems/rubygems — pull request #331 by pixeltrix (2012-05-16 21:46:52+00:00)
Title: Refactor usage of Dir[] to eliminate unsafe glob construction

Contructing globs by concatenation through File.join or string interpolation is
susceptible to errors caused by paths inadvertently including glob characters.
This commit fixes this by using Dir.chdir to change the current directory to a
safe point from which to execute the Dir.glob and then reconstructs the path.

There are no specific tests that have been added but the temporary test
directory name has been altered to include the {} characters. This causes a
significant number of the existing tests to fail which should prevent any
regressions.