Actions
Bug #12634
closedRuby converts '*' on command line to a file name
Bug #12634:
Ruby converts '*' on command line to a file name
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]
Description
Repro:
- ruby script.rb *
- script.rb:
puts ARGV[0]
output:
expected output:
*
OS: Windows 10
This is annoying when passing glob as an arg. Also happens when passing anything starting with *
Updated by krwq (Krzysztof Wicher) about 10 years ago
output is random file name (tags got removed)
Updated by avit (Andrew Vit) about 10 years ago
Updated by shyouhei (Shyouhei Urabe) about 10 years ago
Andrew, I guess this is the key part:
OS: Windows 10
So yes, ruby handles glob in pace of Unix shells on this platform. As far as I remember this is by design.
Updated by nobu (Nobuyoshi Nakada) about 10 years ago
- Status changed from Open to Closed
Updated by usa (Usaku NAKAMURA) about 10 years ago
- Status changed from Closed to Rejected
Anyway, although on Windows, use '*' to prevent globbing.
Actions