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

ruby-changes:60533

From: Nobuyoshi <ko1@a...>
Date: Fri, 27 Mar 2020 19:05:55 +0900 (JST)
Subject: [ruby-changes:60533] 3486a460ea (master): [ruby/reline] Suppress $/ warnings

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

From 3486a460ea3e450982a6aee7456e5128c7aa1f0e Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 27 Mar 2020 00:49:49 +0900
Subject: [ruby/reline] Suppress $/ warnings

https://github.com/ruby/reline/commit/f4eac8c76f

diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb
index c16212c..ed096f0 100644
--- a/test/reline/test_key_actor_emacs.rb
+++ b/test/reline/test_key_actor_emacs.rb
@@ -1897,12 +1897,19 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_key_actor_emacs.rb#L1897
   end
 
   def test_modify_lines_with_wrong_rs
+    verbose, $VERBOSE = $VERBOSE, nil
     original_global_slash = $/
     $/ = 'b'
+    $VERBOSE = verbose
     @line_editor.output_modifier_proc = proc { |output| Reline::Unicode.escape_for_print(output) }
     input_keys("abcdef\n")
-    assert_equal(['abcdef'], @line_editor.__send__(:modify_lines, @line_editor.whole_lines))
+    result = @line_editor.__send__(:modify_lines, @line_editor.whole_lines)
+    $/ = nil
+    assert_equal(['abcdef'], result)
+  ensure
+    $VERBOSE = nil
     $/ = original_global_slash
+    $VERBOSE = verbose
   end
 
 =begin # TODO: move KeyStroke instance from Reline to LineEditor
-- 
cgit v0.10.2


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

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