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

ruby-changes:34227

From: akr <ko1@a...>
Date: Mon, 2 Jun 2014 09:51:38 +0900 (JST)
Subject: [ruby-changes:34227] akr:r46299 (trunk): Suppress a warning.

akr	2014-06-02 00:25:12 +0900 (Mon, 02 Jun 2014)

  New Revision: 46299

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

  Log:
    Suppress a warning.

  Modified files:
    trunk/test/ruby/test_autoload.rb
Index: test/ruby/test_autoload.rb
===================================================================
--- test/ruby/test_autoload.rb	(revision 46298)
+++ test/ruby/test_autoload.rb	(revision 46299)
@@ -73,6 +73,9 @@ p Foo::Bar https://github.com/ruby/ruby/blob/trunk/test/ruby/test_autoload.rb#L73
   end
 
   def test_threaded_accessing_constant
+    # Suppress "warning: loading in progress, circular require considered harmful"
+    old_verbose = $VERBOSE
+    $VERBOSE = false
     Tempfile.create(['autoload', '.rb']) {|file|
       file.puts 'sleep 0.5; class AutoloadTest; X = 1; end'
       file.close
@@ -87,6 +90,8 @@ p Foo::Bar https://github.com/ruby/ruby/blob/trunk/test/ruby/test_autoload.rb#L90
         remove_autoload_constant
       end
     }
+  ensure
+    $VERBOSE = old_verbose
   end
 
   def test_threaded_accessing_inner_constant

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

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