summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/shellwords.rb3
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f45382c..d935cf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jan 19 23:08:18 2003 Akinori MUSHA <knu@iDaemons.org>
+
+ * lib/shellwords.rb (shellwords): A backslash ('\') in single
+ quotes should not be regarded as meta character. This bug or
+ maybe feature was inherited from Perl's shellwords.pl.
+
Sat Jan 18 14:53:49 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* bignum.c (rb_cstr_to_inum): should not erase all 0s, but
diff --git a/lib/shellwords.rb b/lib/shellwords.rb
index 9fd7571..6fb40e8 100644
--- a/lib/shellwords.rb
+++ b/lib/shellwords.rb
@@ -26,9 +26,8 @@ module Shellwords
snippet.gsub!(/\\(.)/, '\1')
elsif line =~ /\A"/ then #"
raise ArgumentError, "Unmatched double quote: #{line}"
- elsif line.sub!(/\A'(([^'\\]|\\.)*)'/, '') then #'
+ elsif line.sub!(/\A'([^']*)'/, '') then #'
snippet = $1
- snippet.gsub!(/\\(.)/, '\1')
elsif line =~ /\A'/ then #'
raise ArgumentError, "Unmatched single quote: #{line}"
elsif line.sub!(/\A\\(.)/, '') then