summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-07 07:09:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-07 07:09:02 +0000
commitba9094308899ad9a6891e9739c2d7a51a851e7e0 (patch)
tree2a81c146884d6461abe816495689d1afd43e511b
parent58284a74e9edee85e18b652bd6a62f23f2dd50a8 (diff)
* ext/iconv/iconv.c (iconv_try): should initialize exceptions
properly. (ruby-bugs-ja:PR#232) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/iconv/iconv.c17
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f0d72be0c15..413c8c9deec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 7 15:41:33 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
+
+ * ext/iconv/iconv.c (iconv_try): should initialize exceptions
+ properly. (ruby-bugs-ja:PR#232)
+
Tue May 7 15:28:03 2002 Minero Aoki <aamine@loveruby.net>
* eval.c (rb_yield_0): The destination of the goto jump was wrong.
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index bf1528d21ad..2366a350cc2 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -159,16 +159,16 @@ iconv_try
/* try the left in next loop */
break;
case EILSEQ:
- return rb_obj_alloc(rb_eIconvIllegalSeq);
+ return rb_class_new_instance(0, 0, rb_eIconvIllegalSeq);
case EINVAL:
- return rb_obj_alloc(rb_eIconvInvalidChar);
+ return rb_class_new_instance(0, 0, rb_eIconvInvalidChar);
default:
rb_sys_fail("iconv");
}
}
else if (*inlen > 0) {
/* something goes wrong */
- return rb_obj_alloc(rb_eIconvIllegalSeq);
+ return rb_class_new_instance(0, 0, rb_eIconvIllegalSeq);
}
return Qfalse;
}
@@ -341,7 +341,7 @@ iconv_convert
*/
/*
=begin
---- Iconv.new(to, from)
+--- Iconv.new(to, from) {|cd| ...}
Creates new code converter from a coding-system designated with ((|from|))
to another one designated with ((|to|)).
:Parameters
@@ -418,7 +418,7 @@ iconv_s_open
=begin
--- Iconv.iconv(to, from, *strs)
Shorthand for
- Iconv.open(to, from) {|cd| (strs + nil).collect {|s| cd.iconv(s)}}
+ Iconv.open(to, from) {|cd| (strs + [nil]).collect {|s| cd.iconv(s)}}
:Parameters
:((|to|)), ((|from|))
see ((<Iconv.new>)).
@@ -661,14 +661,17 @@ iconv_failure_inspect
=begin
== Iconv::IllegalSequence
-Exception in the case of any illegal sequence detected.
+Input conversion stopped due to an input byte that does not belong to
+the input codeset, or the output codeset does not contain the
+character.
=== Superclass
(({ArgumentError}))
=== Included Modules
((<Iconv::Failure>))
== Iconv::InvalidCharacter
-Exception in the case of output coding system can't express the character.
+Input conversion stopped due to an incomplete character or shift
+sequence at the end of the input buffer.
=== Superclass
(({ArgumentError}))
=== Included Modules