Bug #3612
closedwindows: unable to run path with spaces on it anymore.
Description
=begin
With 1.8.6 and 1.9.1, this worked:
IO.popen("c:\Program Files\Internet Explorer\iexplore")
I assume it's a bug that it not work anymore, but am actually ok either way since...it's a bit surprising to not need quotes, since windows does on the command line.
Let me know either way (if it is expected or not).
This behavior is also present in 1.9.2 branch.
Thanks.
-r
=end
        
           Updated by phasis68 (Heesob Park) over 15 years ago
          Updated by phasis68 (Heesob Park) over 15 years ago
          
          
        
        
      
      =begin
Here is a patch for this issue.
--- win32.c     2010-07-26 17:36:18.980422535 +0900
+++ win32.c.new 2010-07-26 17:37:47.582469991 +0900
@@ -1136,10 +1136,7 @@
}
}
shell = dln_find_exe_r(shell, NULL, fbuf, sizeof(fbuf));
- 
if (!shell) {
- 
shell = p ? p : cmd;
- 
}
- 
else {
- 
if (shell) { len = strlen(shell); if (strchr(shell, ' ')) quote = -1; if (shell == fbuf) {
=end
        
           Updated by usa (Usaku NAKAMURA) over 15 years ago
          Updated by usa (Usaku NAKAMURA) over 15 years ago
          
          
        
        
      
      - Status changed from Open to Rejected
=begin
This is intended behavior.
Please do not use the accidental behavior of old rubies.
=end
        
           Updated by rogerdpack (Roger Pack) over 15 years ago
          Updated by rogerdpack (Roger Pack) over 15 years ago
          
          
        
        
      
      =begin
I assumed the accidental behavior was expected, but apparently it was not. Thanks for the clarification.
-r
=end