ruby-changes:28054
From: nobu <ko1@a...>
Date: Thu, 4 Apr 2013 17:23:24 +0900 (JST)
Subject: [ruby-changes:28054] nobu:r40106 (trunk): envutil.rb: assert stderr if marshal failed
nobu 2013-04-04 17:23:16 +0900 (Thu, 04 Apr 2013) New Revision: 40106 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40106 Log: envutil.rb: assert stderr if marshal failed * test/ruby/envutil.rb (assert_separately): force to assert stderr to be empty if marshal failed, as something is emitted probably. Modified files: trunk/test/ruby/envutil.rb Index: test/ruby/envutil.rb =================================================================== --- test/ruby/envutil.rb (revision 40105) +++ test/ruby/envutil.rb (revision 40106) @@ -298,7 +298,11 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L298 abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig)) assert(!abort, FailDesc[status, stderr]) self._assertions += stdout[/^assertions=(\d+)/, 1].to_i - res = Marshal.load(stdout.unpack("m")[0]) + begin + res = Marshal.load(stdout.unpack("m")[0]) + rescue => marshal_error + ignore_stderr = nil + end if res res.backtrace.each do |l| l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"} @@ -312,6 +316,7 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L316 assert_equal("", stderr, "assert_separately failed with error message") end assert_equal(0, status, "assert_separately failed: '#{stderr}'") + raise marshal_error if marshal_error end def assert_warning(pat, msg = nil) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/