From: "steveklabnik (Steve Klabnik)" Date: 2013-08-06T00:14:16+09:00 Subject: [ruby-core:56393] [ruby-trunk - Bug #8550] On Windows Process.spawn 'command', 'arg1', 'arg2', ... evals the arguments Issue #8550 has been updated by steveklabnik (Steve Klabnik). File 0001-Add-caveats-to-Process-spawn-regarding-shell-built-i.patch added I've attached a patch for the RDOC, what do you think? ---------------------------------------- Bug #8550: On Windows Process.spawn 'command', 'arg1', 'arg2', ... evals the arguments https://bugs.ruby-lang.org/issues/8550#change-40905 Author: mdesantis (Maurizio De Santis) Status: Open Priority: Normal Assignee: Category: doc Target version: ruby -v: ruby 2.0.0p195 (2013-05-14) [x64-mingw32] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN =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 -- http://bugs.ruby-lang.org/