aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-18 14:09:21 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-18 14:09:21 +0000
commit5b7b60bb5954e73dada16bc6b342020878489bdc (patch)
tree9e8b5d208f87fde6d7f3a9c64abcce1a9a3c380e
parentbc893dcf0753e5477170de2df476ed665f3e0b95 (diff)
downloadruby-5b7b60bb5954e73dada16bc6b342020878489bdc.tar.gz
* test/ruby/test_beginendblock.rb: remove temporally files early.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--test/ruby/test_beginendblock.rb8
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d1514a844..47537b6d4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jul 18 23:08:57 2012 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/test_beginendblock.rb: remove temporally files early.
+
Wed Jul 18 22:43:02 2012 Tanaka Akira <akr@fsij.org>
* test/ruby/test_autoload.rb: remove temporally files early.
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb
index 7172aec4e1..beb934b1ac 100644
--- a/test/ruby/test_beginendblock.rb
+++ b/test/ruby/test_beginendblock.rb
@@ -30,6 +30,8 @@ class TestBeginEndBlock < Test::Unit::TestCase
assert_equal(%w(:begin :end), result.split)
result = IO.popen([ruby, "-p", "-eBEGIN{p :begin}", "-eEND{p :end}", inputpath]){|io|io.read}
assert_equal(%w(:begin foo bar :end), result.split)
+ ensure
+ input.unlink
end
def test_begininmethod
@@ -76,6 +78,9 @@ endblockwarn_rb:2: warning: END in method; use at_exit
EOW
assert_equal(expected, File.read(erroutpath))
# expecting Tempfile to unlink launcher and errout file.
+ ensure
+ launcher.unlink
+ errout.unlink
end
def test_raise_in_at_exit
@@ -146,7 +151,8 @@ EOW
"outer0" ]
assert_in_out_err(t.path, "", expected, [], "[ruby-core:35237]")
- t.close
+ ensure
+ t.close(true)
end
def test_rescue_at_exit