On Windows Process.spawn 'command', 'arg1', 'arg2', ... evals the arguments
Environment: ruby 2.0.0p195 (2013-05-14) x64-mingw32 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.
- process.c: [DOC] Document caveats of command form of Process.spawn with regard to the shell and OS. Patched by Steve Klabnik [Bug #8550]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
#3 [ruby-core:56393] Updated by steveklabnik (Steve Klabnik) almost 5 years ago
- File 0001-Add-caveats-to-Process-spawn-regarding-shell-built-i.patch 0001-Add-caveats-to-Process-spawn-regarding-shell-built-i.patch added
I've attached a patch for the RDOC, what do you think?
#4 Updated by zzak (Zachary Scott) almost 5 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100