[前][次][番号順一覧][スレッド一覧]

ruby-changes:56888

From: Kazuhiro <ko1@a...>
Date: Fri, 9 Aug 2019 16:31:25 +0900 (JST)
Subject: [ruby-changes:56888] Kazuhiro NISHIYAMA: a4a2dd7942 (master): Revert a6e32855d079e8f3806d8be8a5f5cf7b3a967133 partially

https://git.ruby-lang.org/ruby.git/commit/?id=a4a2dd7942

From a4a2dd79420d1061ab1615a50b830f567e043d34 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Fri, 9 Aug 2019 16:29:43 +0900
Subject: Revert a6e32855d079e8f3806d8be8a5f5cf7b3a967133 partially

Fix TypeError when typing `''.[TAB]`

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 https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L824
         # skip
         i += 2
       elsif slice =~ quote_characters_regexp # find new "
-        quote = $~
+        quote = $&
         closing_quote = /(?!\\)#{Regexp.escape(quote)}/
         escaped_quote = /\\#{Regexp.escape(quote)}/
         i += 1
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]