aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-14 10:51:25 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-14 10:51:25 +0000
commitcb728a297b3dd26e84d40456a4eddb6164bebaff (patch)
tree04ee1a019d4d444275d4bd880968eab78820dccc
parent8fc86b0d34af4f0b266682351c1478d1c70a3f98 (diff)
downloadruby-cb728a297b3dd26e84d40456a4eddb6164bebaff.tar.gz
* test/ruby/test_autoload.rb: remove temporary directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--test/ruby/test_autoload.rb25
2 files changed, 17 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a44071f9a..0439e8cd6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Jun 14 19:50:49 2011 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/test_autoload.rb: remove temporary directory.
+
Tue Jun 14 11:05:03 2011 Narihiro Nakamura <narihiro@netlab.jp>
* gc.c (rb_gc_set_params): call initial_expand_heap if
diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb
index dd049f047a..e175e57006 100644
--- a/test/ruby/test_autoload.rb
+++ b/test/ruby/test_autoload.rb
@@ -39,17 +39,18 @@ p Foo::Bar
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