mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
5e3467c441
commit
80bedec6c2
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue