diff options
-rw-r--r-- | encoding.c | 4 | ||||
-rw-r--r-- | test/ruby/test_m17n.rb | 22 |
2 files changed, 16 insertions, 10 deletions
@@ -1798,7 +1798,7 @@ static int rb_enc_name_list_i(st_data_t name, st_data_t idx, st_data_t arg) { VALUE ary = (VALUE)arg; - VALUE str = rb_fstring_cstr((char *)name); rb_ary_push(ary, str); return ST_CONTINUE; } @@ -1843,7 +1843,7 @@ rb_enc_aliases_enc_i(st_data_t name, st_data_t orig, st_data_t arg) str = rb_fstring_cstr(rb_enc_name(enc)); rb_ary_store(ary, idx, str); } - key = rb_fstring_cstr((char *)name); rb_hash_aset(aliases, key, str); return ST_CONTINUE; } @@ -1722,14 +1722,20 @@ class TestM17N < Test::Unit::TestCase end def test_encoding_names_of_default_internal - # [Bug #20595] - assert_separately(%w(-W0), "#{<<~"begin;"}\n#{<<~"end;"}") - begin; - Encoding.default_internal = Encoding::ASCII_8BIT - names = Encoding.default_internal.names - Encoding.default_internal = nil - assert_include names, "int" + "ernal", "[Bug #20595]" - end; end def test_greek_capital_gap |