summaryrefslogtreecommitdiff
path: root/test/ruby/envutil.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-10 14:02:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-10 14:02:14 +0000
commit7e47f6838a1c713063d54df05b4ad2a4cd460df5 (patch)
tree57d26a34e08a5e1c464713e9a28a14d4388afaad /test/ruby/envutil.rb
parentd33820e85fcfb24802b2be1e2d40494b46b5d940 (diff)
envutil.rb: ensure errors
* test/ruby/envutil.rb (assert_separately): dump error and assertions by END to ensure outputs even if failed to catch the raised exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r--test/ruby/envutil.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index 7424997e84..6409872ba4 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -324,11 +324,11 @@ module Test
line -= 2
src = <<eom
# -*- coding: #{src.encoding}; -*-
- require #{__dir__.dump}'/envutil';include Test::Unit::Assertions;begin
-#{src}
- ensure
+ require #{__dir__.dump}'/envutil';include Test::Unit::Assertions
+ END {
puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}"
- end
+ }
+#{src}
class Test::Unit::Runner
@@stop_auto_run = true
end