I put together a spec of my grievances with system() on Windows and
made a simple patched implementation,

  http://drake.rubyforge.org/tmp/system_spec_kernel.html

  http://drake.rubyforge.org/tmp/system_spec_alt.html
  http://github.com/quix/alt_system/tree/master/lib/alt_system/alt_system.rb

Are there any test failures which should succeed?

The failures include:

  * system("x/y.bat") fails because it is interpreted as option /y
    being passed to command x.

  * system("y") fails when y.bat is in the current directory and "."
    is in PATH.  "y" succeeds in the console shell window.  Similar
    problems occur when passing relative or absolute paths.

  * system("c:/x/z", "1") fails to spawn c:/x/z.exe.

  * Variables are not expanded:
      system(%{ruby -e "p '%PATH%'"})  #=> "%PATH%"

If Kernel#system should not be changed, do the test failures
justify the inclusion of a higher-level version of system()?

The original problem involved spawning ruby from ruby using

  File.join(CONFIG["bindir"], CONFIG["ruby_install_name"])
    #=> "C:/Ruby/bin/ruby"

which fails (third item above).  One solution is to append
CONFIG["EXEEXT"], however jruby defines ruby_install_name as
jruby.bat, giving jruby.bat.exe.  To my knowledge there is no simple
cross-platform way to run ruby from ruby.

James M. Lawrence