Issue #4343 has been updated by Vit Ondruch.


Ok, the confusion comes from the differences between platforms. Lets have file named "foo.bar". 

On Windows, the filename consist of two parts, the filename "foo" and the extension "bar". These two parts are traditionally separated by dot.

On Unices, there is just filename "foo.bar", one string, no extensions etc. 

Ruby should choose to treat the filename either as a whole string, i.e. the Unix way, or try to support platform specific behavior. Currently, it is mixture:

ruby -e "p Dir.glob('bla.*')"
["bla.rb"]

behaves differently from:

ruby -e "p Dir.glob('bla.{,*}')"
["bla.", "bla.rb"]

In first case, Ruby treats the glob pattern as a string, i.e. Unix, nothing know about something like extension, while in the second case it suddenly knows something about extensions and what they are.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/4343

----------------------------------------
http://redmine.ruby-lang.org