diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-30 19:23:23 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-30 19:23:23 +0000 |
commit | 5bbc51ed43e6fee737433964191b55d22497cdbd (patch) | |
tree | 3a8a11c1d9d7537c6841bb0a14b7bfc35199adde | |
parent | d3db454d19f2359403ad3aa90b199d67865d1d58 (diff) | |
download | ruby-5bbc51ed43e6fee737433964191b55d22497cdbd.tar.gz |
* transcode.c (econv_insert_output): renamed from
econv_primitive_insert_output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_econv.rb | 10 | ||||
-rw-r--r-- | transcode.c | 4 |
3 files changed, 12 insertions, 7 deletions
@@ -1,3 +1,8 @@ +Sun Aug 31 04:22:51 2008 Tanaka Akira <akr@fsij.org> + + * transcode.c (econv_insert_output): renamed from + econv_primitive_insert_output. + Sun Aug 31 04:20:46 2008 Tanaka Akira <akr@fsij.org> * test/ruby/test_econv.rb: follow econv_primitive_errinfo change. diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index efb5c085be..302a3e3c48 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -415,25 +415,25 @@ class TestEncodingConverter < Test::Unit::TestCase ec = Encoding::Converter.new("EUC-JP", "ISO-2022-JP") ec.primitive_convert(src="\xa1\xa1", dst="", nil, 10, Encoding::Converter::PARTIAL_INPUT) assert_equal("\e$B!!".force_encoding("ISO-2022-JP"), dst) - assert_equal(true, ec.primitive_insert_output("???")) + assert_equal(true, ec.insert_output("???")) ec.primitive_convert("", dst, nil, 10, Encoding::Converter::PARTIAL_INPUT) assert_equal("\e$B!!\e(B???".force_encoding("ISO-2022-JP"), dst) ec.primitive_convert(src="\xa1\xa2", dst, nil, 10, Encoding::Converter::PARTIAL_INPUT) assert_equal("\e$B!!\e(B???\e$B!\"".force_encoding("ISO-2022-JP"), dst) - assert_equal(true, ec.primitive_insert_output("\xA1\xA1".force_encoding("EUC-JP"))) + assert_equal(true, ec.insert_output("\xA1\xA1".force_encoding("EUC-JP"))) ec.primitive_convert("", dst, nil, 10, Encoding::Converter::PARTIAL_INPUT) assert_equal("\e$B!!\e(B???\e$B!\"!!".force_encoding("ISO-2022-JP"), dst) ec.primitive_convert(src="\xa1\xa3", dst, nil, 10, Encoding::Converter::PARTIAL_INPUT) assert_equal("\e$B!!\e(B???\e$B!\"!!!\#".force_encoding("ISO-2022-JP"), dst) - assert_equal(true, ec.primitive_insert_output("\u3042")) + assert_equal(true, ec.insert_output("\u3042")) ec.primitive_convert("", dst, nil, 10, Encoding::Converter::PARTIAL_INPUT) assert_equal("\e$B!!\e(B???\e$B!\"!!!\#$\"".force_encoding("ISO-2022-JP"), dst) assert_raise(Encoding::ConversionUndefined) { - ec.primitive_insert_output("\uFFFD") + ec.insert_output("\uFFFD") } assert_equal("\e$B!!\e(B???\e$B!\"!!!\#$\"".force_encoding("ISO-2022-JP"), dst) @@ -553,7 +553,7 @@ class TestEncodingConverter < Test::Unit::TestCase def test_noconv_insert_output ec = Encoding::Converter.new("", "") - ec.primitive_insert_output("xyz") + ec.insert_output("xyz") ret = ec.primitive_convert(src="abc", dst="", nil, 20) assert_equal(:finished, ret) assert_equal(["xyzabc", ""], [dst, src]) diff --git a/transcode.c b/transcode.c index d9093b23bd..d6fc3d4a39 100644 --- a/transcode.c +++ b/transcode.c @@ -2707,7 +2707,7 @@ econv_primitive_errinfo(VALUE self) } static VALUE -econv_primitive_insert_output(VALUE self, VALUE string) +econv_insert_output(VALUE self, VALUE string) { const char *insert_enc; @@ -2833,7 +2833,7 @@ Init_transcode(void) rb_define_method(rb_cEncodingConverter, "convert", econv_convert, 1); rb_define_method(rb_cEncodingConverter, "finish", econv_finish, 0); rb_define_method(rb_cEncodingConverter, "primitive_errinfo", econv_primitive_errinfo, 0); - rb_define_method(rb_cEncodingConverter, "primitive_insert_output", econv_primitive_insert_output, 1); + rb_define_method(rb_cEncodingConverter, "insert_output", econv_insert_output, 1); rb_define_method(rb_cEncodingConverter, "primitive_putback", econv_primitive_putback, 1); rb_define_const(rb_cEncodingConverter, "INVALID_MASK", INT2FIX(ECONV_INVALID_MASK)); rb_define_const(rb_cEncodingConverter, "INVALID_IGNORE", INT2FIX(ECONV_INVALID_IGNORE)); |