Redirect stderr git ls-files to null without shelling out.
When building by gem, __FILE__ is the path name given in the
command line, or the gemspec file name in the current directory. In
that case, comparison it and expanded path never equal. Compare
listed file names with the base name of __FILE__ instead.
[rubygems/rubygems] Use
IO.popento list filesRedirect stderr
git ls-filesto null without shelling out.When building by
gem,__FILE__is the path name given in thecommand line, or the gemspec file name in the current directory. In
that case, comparison it and expanded path never equal. Compare
listed file names with the base name of
__FILE__instead.https://github.com/rubygems/rubygems/commit/5583433dbb