Issue #11206 has been updated by Usaku NAKAMURA.


IMO, ruby should offer an option to users to select matching short names or not. (maybe File::FNM_SHORTNAME, or somehow.)
And, the default should not match short names.

----------------------------------------
Bug #11206: short file name match incompatibility
https://bugs.ruby-lang.org/issues/11206#change-52717

* Author: Yui NARUSE
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
When I develop a foo.gem, my working diretory has foo.gemspec and foo.gem.
If I run `gem install -l foo`,  it fails as following:

ERROR:  While executing gem ... (Gem::Package::FormatError)
    package metadata is missing in foo.gemspec

Because gem command tries to traverse the current directory with Dir["*.gem"],
and it include *.gemspec.


Another example, Rakefile has `rake clean` task and it is specified by CLEAN constant.
if I specify CLEAN.include( "*.gem" ), it removes *.gemspec.



-- 
https://bugs.ruby-lang.org/