Issue #7374 has been updated by luislavena (Luis Lavena).

Assignee changed from h.shirosaki (Hiroshi Shirosaki) to luislavena (Luis Lavena)
Priority changed from Normal to High
Target version set to 2.0.0

=begin
I can confirm this happens on both 1.9.3-p327 and trunk.

Problem seems to be related to replace_to_long_name which attempts to expand the last part of the path using FindFirstFileW (globing), but is ignoring that it includes "*" in the filename.

I'm checking this and adding a test for this scenario.

Thank you for your report.
=end
----------------------------------------
Bug #7374: File.expand_path resolving to first file/dir instead of absolute path
https://bugs.ruby-lang.org/issues/7374#change-32992

Author: mdube / arcane-technologies.com (Martin Dubé)
Status: Assigned
Priority: High
Assignee: luislavena (Luis Lavena)
Category: core
Target version: 2.0.0
ruby -v: ruby 1.9.3p327 (2012-11-10) [i386-mingw32]


=begin
(({File.expand_path("./*", "c:)"}))
will give "c:/$recycle.bin" as result instead of "c:/*"

(({File.expand_path("./*", "c:/temp)"}))
will give "c:/temp/." as result instead of "c:/temp/*"

It looks like the first directory entry is returned instead of the absolute path.


=end


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