summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-30 19:23:23 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-30 19:23:23 +0000
commitafa3d26b82a4923fb413a28f62b5bb34e6da7201 (patch)
tree3a8a11c1d9d7537c6841bb0a14b7bfc35199adde
parent4814646fc68a7e7f648362690395ec52f5bd5b18 (diff)
downloadruby-afa3d26b82a4923fb413a28f62b5bb34e6da7201.tar.gz
ruby-afa3d26b82a4923fb413a28f62b5bb34e6da7201.tar.xz
ruby-afa3d26b82a4923fb413a28f62b5bb34e6da7201.zip
* transcode.c (econv_insert_output): renamed from
econv_primitive_insert_output. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_econv.rb10
-rw-r--r--transcode.c4
3 files changed, 12 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index eeb6dea39..50a22533a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 efb5c085b..302a3e3c4 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 d9093b23b..d6fc3d4a3 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));