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

ruby-changes:34197

From: akr <ko1@a...>
Date: Mon, 2 Jun 2014 08:56:39 +0900 (JST)
Subject: [ruby-changes:34197] akr:r46294 (trunk): Suppress a warning.

akr	2014-06-01 21:09:08 +0900 (Sun, 01 Jun 2014)

  New Revision: 46294

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=46294&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 46293)
+++ test/ruby/test_autoload.rb	(revision 46294)
@@ -90,6 +90,9 @@ p Foo::Bar https://github.com/ruby/ruby/blob/trunk/test/ruby/test_autoload.rb#L90
   end
 
   def test_threaded_accessing_inner_constant
+    # Suppress "warning: loading in progress, circular require considered harmful"
+    old_verbose = $VERBOSE
+    $VERBOSE = false
     Tempfile.create(['autoload', '.rb']) {|file|
       file.puts 'class AutoloadTest; sleep 0.5; X = 1; end'
       file.close
@@ -104,6 +107,8 @@ p Foo::Bar https://github.com/ruby/ruby/blob/trunk/test/ruby/test_autoload.rb#L107
         remove_autoload_constant
       end
     }
+  ensure
+    $VERBOSE = old_verbose
   end
 
   def test_nameerror_when_autoload_did_not_define_the_constant

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

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