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

ruby-changes:55388

From: kazu <ko1@a...>
Date: Wed, 17 Apr 2019 17:53:36 +0900 (JST)
Subject: [ruby-changes:55388] kazu:r67596 (trunk): Suppress warning in assertion too

kazu	2019-04-17 17:53:32 +0900 (Wed, 17 Apr 2019)

  New Revision: 67596

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67596

  Log:
    Suppress warning in assertion too

  Modified files:
    trunk/test/ruby/test_pattern_matching.rb
Index: test/ruby/test_pattern_matching.rb
===================================================================
--- test/ruby/test_pattern_matching.rb	(revision 67595)
+++ test/ruby/test_pattern_matching.rb	(revision 67596)
@@ -94,12 +94,15 @@ class TestPatternMatching < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L94
     end
 
     assert_block do
+      verbose, $VERBOSE = $VERBOSE, nil # suppress "warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!"
       eval(%q{
         case true
         in a
           a
         end
       })
+    ensure
+      $VERBOSE = verbose
     end
 
     assert_block do

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

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