Project

General

Profile

Actions

Bug #4393

closed

windows commands starting with "@" should run at all

Added by rogerdpack (Roger Pack) almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-02-09 trunk 30831) [i386-mswin32_100]
Backport:
[ruby-core:35218]

Description

=begin
Hello all.
Originally reported this here:
http://www.ruby-forum.com/topic/1060963

I believe in windows the following should work but fails (should call out to cmd to process it...)

system("ls.exe")
2.3 2.4
=> true

system("@ls.exe")
=> nil

Thanks!
-r
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #4396: windows commands starting with "@" should run at all even though command string is quoted by `"'.Rejected02/14/2011Actions
Actions #1

Updated by kosaki (Motohiro KOSAKI) almost 14 years ago

  • ruby -v changed from ruby 1.9.2p0 (2010-08-18) [i386-mingw32] to ruby 1.9.3dev (2011-02-09 trunk 30831) [i386-mswin32_100]

=begin
Agreed. C lang's System() allow system("@dir"). Therefore ruby's should allow it too.
Plus, This can be reporoduced on trunk. then I've replaced `ruby -v' field.

=end

Actions #2

Updated by usa (Usaku NAKAMURA) almost 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r30867.
Roger, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • win32/win32.c (is_internal_cmd): if the first char of prog is '@',
    execute it via shell. [ruby-core:35218] (#4393)
    =end

Updated by kosaki (Motohiro KOSAKI) over 13 years ago

Note: ruby 1.8 makes different result. because we changed system() spec at ruby-1.9.

system("@ls.exe")
=> false

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0