Project

General

Profile

Backport #1315

incorrect string escaping in passing command to Ruby on Windows system

Added by j_matthews (Jim Matthews) over 10 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[:]

Description

=begin
The following information pertains to Ruby on Windows XP systems (and probably on Vista as well).

On Ruby 1.8.6-27(all patch levels) the command line passed to Ruby is incorrectly escaped.
C:>ruby --version
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

C:>ruby -e "puts \"Does this work?\""
-e:1: unterminated string meets end of file

C:>

On earlier versions of Ruby, this works correctly:
C:>ruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:>ruby -e "puts \"Does this work?\""
Does this work?

C:>

This causes problems in Ruby programs that use the "system" method and pass a command line. In particular the testing tool Watir uses the system method to implement functionality. This problem has caused that functionality to break.

Both the Ruby installations described above were installed with the one-click Ruby installer for Windows obtained from rubyforge.

A collegue did the test on Ruby 1.8.6-27 on a MAC and did not get the error. It appears this is a problem between Ruby 1.8.6-27 and Windows systems.

Jim Matthews
=end

History

#1

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Category set to core
  • Target version set to Ruby 1.8.6

=begin
Irrelevant to redmine.
Please repost if possible.
=end

#2

Updated by jeremyevans0 (Jeremy Evans) 4 months ago

  • Status changed from Open to Closed
  • Description updated (diff)
  • Project changed from Ruby 1.8 to Backport187

Also available in: Atom PDF