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

ruby-changes:20034

From: akr <ko1@a...>
Date: Tue, 14 Jun 2011 19:51:37 +0900 (JST)
Subject: [ruby-changes:20034] akr:r32081 (trunk): * test/ruby/test_autoload.rb: remove temporary directory.

akr	2011-06-14 19:51:25 +0900 (Tue, 14 Jun 2011)

  New Revision: 32081

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

  Log:
    * test/ruby/test_autoload.rb: remove temporary directory.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_autoload.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32080)
+++ ChangeLog	(revision 32081)
@@ -1,3 +1,7 @@
+Tue Jun 14 19:50:49 2011  Tanaka Akira  <akr@f...>
+
+	* test/ruby/test_autoload.rb: remove temporary directory.
+
 Tue Jun 14 11:05:03 2011  Narihiro Nakamura  <narihiro@n...>
 
 	* gc.c (rb_gc_set_params): call initial_expand_heap if
Index: test/ruby/test_autoload.rb
===================================================================
--- test/ruby/test_autoload.rb	(revision 32080)
+++ test/ruby/test_autoload.rb	(revision 32081)
@@ -39,17 +39,18 @@
     bug4565 = '[ruby-core:35679]'
 
     require 'tmpdir'
-    tmpdir = Dir.mktmpdir('autoload')
-    tmpfile = tmpdir + '/foo.rb'
-    a = Module.new do
-      autoload :X, tmpfile
-    end
-    b = Module.new do
-      include a
-    end
-    assert_equal(true, a.const_defined?(:X))
-    assert_equal(true, b.const_defined?(:X))
-    assert_equal(tmpfile, a.autoload?(:X), bug4565)
-    assert_equal(tmpfile, b.autoload?(:X), bug4565)
+    Dir.mktmpdir('autoload') {|tmpdir|
+      tmpfile = tmpdir + '/foo.rb'
+      a = Module.new do
+        autoload :X, tmpfile
+      end
+      b = Module.new do
+        include a
+      end
+      assert_equal(true, a.const_defined?(:X))
+      assert_equal(true, b.const_defined?(:X))
+      assert_equal(tmpfile, a.autoload?(:X), bug4565)
+      assert_equal(tmpfile, b.autoload?(:X), bug4565)
+    }
   end
 end

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

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