aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-05-30 20:06:59 +0900
committeraycabta <aycabta@gmail.com>2019-05-30 20:06:59 +0900
commit74a0e3ec235380541db95e18978e4e1aa174b407 (patch)
tree9145094bd1dd69af2fb33585bccef65508a84e2e
parentecd0f1d966209742382e5bd4591bafc88152a697 (diff)
downloadruby-74a0e3ec235380541db95e18978e4e1aa174b407.tar.gz
Use start_with? for escaped quote too
-rw-r--r--lib/reline/line_editor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index af23367063..a6d7ac5e0d 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -766,7 +766,7 @@ class Reline::LineEditor
if quote and slice.start_with?(/(?!\\)#{Regexp.escape(quote)}/) # closing "
quote = nil
i += 1
- elsif quote and slice =~ /\A\\#{Regexp.escape(quote)}/ # escaped \"
+ elsif quote and slice.start_with?(/\\#{Regexp.escape(quote)}/) # escaped \"
# skip
i += 2
elsif slice =~ quote_characters_regexp # find new "