summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-05 08:33:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-05 08:33:38 +0000
commit80bedec6c25c82f2b37ecab5bab84576df52559c (patch)
tree36298efe09ac92a4d38602d57228da3bef4b629c /test/lib
parent5e3467c4414df815b3b00d2b0372026b069e7f7d (diff)
assertions.rb: fallback encoding error
* test/lib/test/unit/assertions.rb (message): fallback when outputs from different encoding commands mixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/test/unit/assertions.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index ca15bef..936dcbf 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -490,7 +490,11 @@ EOT
if 1 < ary.length
ary[0...-1] = ary[0...-1].map {|str| str.sub(/(?<!\.)\z/, '.') }
end
- ary.join("\n")
+ begin
+ ary.join("\n")
+ rescue Encoding::CompatibilityError
+ ary.map(&:b).join("\n")
+ end
end
else
super