Project

General

Profile

Actions

Bug #8550

closed

On Windows Process.spawn 'command', 'arg1', 'arg2', ... evals the arguments

Added by mdesantis (Maurizio De Santis) almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p195 (2013-05-14) [x64-mingw32]
[ruby-core:55572]

Description

=begin
Environment: ruby 2.0.0p195 (2013-05-14) [x64-mingw32] (RubyInstaller with DevKit) on Windows 7 64bit

According to the Process.spawn documentation, the syntax 'cmdname, arg1, ...' doesn't involve the shell. Indeed, on Unix this is true: ((%Process.spawn 'echo', '$PATH'%)) prints '$PATH'.

But on Windows the behaviour is different: executing ((%Process.spawn 'echo', '%Path%'%)) prints the contents of the Path environment variable.

I think the behaviour should be the same on the different OSes; at least, if it is not possible, the documentation should point it out.
=end


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0