summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-20 02:07:24 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-20 02:07:24 +0000
commit5f4b7f5afa7fb91d93192f32e6eaf0e4e2a95870 (patch)
tree5b9333c0e49c15f9a167f35e9688b7a61b9bb474 /lib
parent8198cca945dba5bf43cd6bbca0d13add003f223d (diff)
* lib/test/unit.rb, lib/test/unit/parallel.rb:
generate error message (String) in parallel.rb instead of marshalling Exception. Fixes [Bug #6882] [ruby-dev:46054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/test/unit.rb6
-rw-r--r--lib/test/unit/parallel.rb5
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index e96ec558eb..a0902acb8b 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -370,11 +370,7 @@ module Test
def after_worker_down(worker, e=nil, c=false)
return unless @options[:parallel]
return if @interrupt
- if e
- b = e.backtrace
- warn "#{b.shift}: #{e.message} (#{e.class})"
- STDERR.print b.map{|s| "\tfrom #{s}"}.join("\n")
- end
+ warn e if e
@need_quit = true
warn ""
warn "Some worker was crashed. It seems ruby interpreter's bug"
diff --git a/lib/test/unit/parallel.rb b/lib/test/unit/parallel.rb
index 232aa44151..32f15382ec 100644
--- a/lib/test/unit/parallel.rb
+++ b/lib/test/unit/parallel.rb
@@ -137,7 +137,10 @@ module Test
rescue Errno::EPIPE
rescue Exception => e
begin
- _report "bye", Marshal.dump(e)
+ trace = e.backtrace
+ err = ["#{trace.shift}: #{e.message} (#{e.class})"] + trace.map{|t| t.prepend("\t") }
+
+ _report "bye", Marshal.dump(err.join("\n"))
rescue Errno::EPIPE;end
exit
ensure