mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 18:13:58 +02:00
* transcode.c (make_econv_exception): rename instance variable names
for storing encoding names. (ecerr_source_encoding_name): method renamed. (ecerr_destination_encoding_name): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2d71485ec1
commit
72ee10b19c
3 changed files with 25 additions and 18 deletions
|
@ -455,8 +455,8 @@ class TestEncodingConverter < Test::Unit::TestCase
|
|||
err = assert_raise(Encoding::InvalidByteSequence) {
|
||||
"abc\xa4def".encode("ISO-8859-1", "EUC-JP")
|
||||
}
|
||||
assert_equal("EUC-JP", err.source_encoding)
|
||||
assert_equal("UTF-8", err.destination_encoding)
|
||||
assert_equal("EUC-JP", err.source_encoding_name)
|
||||
assert_equal("UTF-8", err.destination_encoding_name)
|
||||
assert_equal("\xA4".force_encoding("ASCII-8BIT"), err.error_bytes)
|
||||
assert_equal("d", err.readagain_bytes)
|
||||
assert_equal(false, err.incomplete_input?)
|
||||
|
@ -466,8 +466,8 @@ class TestEncodingConverter < Test::Unit::TestCase
|
|||
err = assert_raise(Encoding::InvalidByteSequence) {
|
||||
"abc\xa4".encode("ISO-8859-1", "EUC-JP")
|
||||
}
|
||||
assert_equal("EUC-JP", err.source_encoding)
|
||||
assert_equal("UTF-8", err.destination_encoding)
|
||||
assert_equal("EUC-JP", err.source_encoding_name)
|
||||
assert_equal("UTF-8", err.destination_encoding_name)
|
||||
assert_equal("\xA4".force_encoding("ASCII-8BIT"), err.error_bytes)
|
||||
assert_equal(nil, err.readagain_bytes)
|
||||
assert_equal(true, err.incomplete_input?)
|
||||
|
@ -477,8 +477,8 @@ class TestEncodingConverter < Test::Unit::TestCase
|
|||
err = assert_raise(Encoding::ConversionUndefined) {
|
||||
"abc\xa4\xa2def".encode("ISO-8859-1", "EUC-JP")
|
||||
}
|
||||
assert_equal("UTF-8", err.source_encoding)
|
||||
assert_equal("ISO-8859-1", err.destination_encoding)
|
||||
assert_equal("UTF-8", err.source_encoding_name)
|
||||
assert_equal("ISO-8859-1", err.destination_encoding_name)
|
||||
assert_equal("\u{3042}", err.error_char)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue