Bug #1434

ruby's "system" method differs from win32's "system()"

Added by Greg Hazel almost 3 years ago. Updated 10 months ago.

[redmine4ruby-lang:251]
Status:Closed Start date:05/05/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
ruby -v:

Description

Ruby seems to have gone out of the way to implement the "system" method without calling "system()" on Windows. As a result, ruby's method does not behave the same.

This should work:

system "blah.html"

In the C runtime system() (or from the command prompt, or from os.system in Python, etc), this causes Windows to open that file with the default handler for that extension. Ruby's method just returns false, as CreateProcess() can not be used in this fashion.

This seems like an easy bug to fix. Why does the Win32 implementation use CreateProcess() instead of system()?

History

Updated by Yui NARUSE almost 2 years ago

  • Status changed from Open to Closed

Updated by Greg Hazel almost 2 years ago

So, what was the answer here?

Also available in: Atom PDF