summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@idaemons.org>2020-06-16 23:23:13 +0900
committerAkinori MUSHA <knu@idaemons.org>2020-06-16 23:23:13 +0900
commitb877928ca562ce1769d821769d3e417ed973b156 (patch)
tree372c76ff65de0478a8a6a8c0edeb361bc76ad9bc /lib
parent68e43103442b95ebfa133e238550159fc3d1197d (diff)
Fix the ArgumentError message in shellsplit
Change "double quote" to just "quote" because the message is about any type of quotes.
Diffstat (limited to 'lib')
-rw-r--r--lib/shellwords.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/shellwords.rb b/lib/shellwords.rb
index 0bc34faf6e..4368a53ea8 100644
--- a/lib/shellwords.rb
+++ b/lib/shellwords.rb
@@ -28,7 +28,7 @@
# cause an ArgumentError.
#
# argv = "they all ran after the farmer's wife".shellsplit
-# #=> ArgumentError: Unmatched double quote: ...
+# #=> ArgumentError: Unmatched quote: ...
#
# Shellwords also provides methods that do the opposite.
# Shellwords.escape, or its alias, String#shellescape, escapes
@@ -90,7 +90,7 @@ module Shellwords
field = String.new
line.scan(/\G\s*(?>([^\s\\\'\"]+)|'([^\']*)'|"((?:[^\"\\]|\\.)*)"|(\\.?)|(\S))(\s|\z)?/m) do
|word, sq, dq, esc, garbage, sep|
- raise ArgumentError, "Unmatched double quote: #{line.inspect}" if garbage
+ raise ArgumentError, "Unmatched quote: #{line.inspect}" if garbage
# 2.2.3 Double-Quotes:
#
# The <backslash> shall retain its special meaning as an