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

ruby-changes:32044

From: nobu <ko1@a...>
Date: Tue, 10 Dec 2013 23:02:21 +0900 (JST)
Subject: [ruby-changes:32044] nobu:r44123 (trunk): envutil.rb: ensure errors

nobu	2013-12-10 23:02:14 +0900 (Tue, 10 Dec 2013)

  New Revision: 44123

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

  Log:
    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.

  Modified files:
    trunk/test/ruby/envutil.rb
Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 44122)
+++ test/ruby/envutil.rb	(revision 44123)
@@ -324,11 +324,11 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L324
         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

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

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