mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix error when Encoding.default_external is Encoding::IBM437
https://ci.appveyor.com/project/ruby/ruby/build/1.0.9151#L4601 ``` 1) Error: TestArgf#test_inplace_nonascii: Encoding::UndefinedConversionError: U+3042 from UTF-8 to IBM437 ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c7ce155412
commit
82de3b95c4
1 changed files with 5 additions and 5 deletions
|
@ -258,12 +258,12 @@ class TestArgf < Test::Unit::TestCase
|
|||
def test_inplace_nonascii
|
||||
ext = Encoding.default_external or
|
||||
skip "no default external encoding"
|
||||
if ext == Encoding::US_ASCII
|
||||
skip "external encoding is us-ascii"
|
||||
end
|
||||
t = nil
|
||||
["\u{3042}", "\u{e9}"].any? {|n| t = make_tempfile(n.encode(ext))} or
|
||||
skip "no name to test"
|
||||
["\u{3042}", "\u{e9}"].any? do |n|
|
||||
t = make_tempfile(n.encode(ext))
|
||||
rescue Encoding::UndefinedConversionError
|
||||
end
|
||||
t or skip "no name to test"
|
||||
assert_in_out_err(["-i.bak", "-", t.path],
|
||||
"#{<<~"{#"}\n#{<<~'};'}")
|
||||
{#
|
||||
|
|
Loading…
Reference in a new issue