summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-09 16:29:43 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-09 16:29:43 +0900
commita4a2dd79420d1061ab1615a50b830f567e043d34 (patch)
tree08eba54420d4bc3f162a1c757684f41ae4aeeddd
parent3cbd56d574a3ce6d5ddeb748462eb4dcdce4d166 (diff)
Revert a6e32855d079e8f3806d8be8a5f5cf7b3a967133 partially
Fix TypeError when typing `''.[TAB]`
-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 6f4b118..4c97a6f 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -824,7 +824,7 @@ class Reline::LineEditor
# skip
i += 2
elsif slice =~ quote_characters_regexp # find new "
- quote = $~
+ quote = $&
closing_quote = /(?!\\)#{Regexp.escape(quote)}/
escaped_quote = /\\#{Regexp.escape(quote)}/
i += 1