From d9b63be117c75aa51d0c4d1faeceaa8255ee280f Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 26 Dec 2008 05:04:39 +0000 Subject: * io.c (fptr_finalize): close the IO object even if finish_writeconv or flush is failed. (finish_writeconv): don't raise. return errno or exception. (finish_writeconv_arg): removed. (finish_writeconv_sync): follow finish_writeconv change. * transcode.c (rb_econv_make_exception): new function. * include/ruby/encoding.h (rb_econv_make_exception): declared. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/ruby') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 64bfff594..6a808a58c 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -248,6 +248,9 @@ const char *rb_econv_encoding_to_insert_output(rb_econv_t *ec); /* raise an error if the last rb_econv_convert is error */ void rb_econv_check_error(rb_econv_t *ec); +/* returns an exception object or nil */ +VALUE rb_econv_make_exception(rb_econv_t *ec); + int rb_econv_putbackable(rb_econv_t *ec); void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n); -- cgit