diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ext/iconv/iconv.c | 12 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 23 insertions, 1 deletions
@@ -1,3 +1,13 @@ +Tue Jun 8 17:45:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/iconv/iconv.c (rb_iconv_sys_fail): fix number of arguments. + a patch by Masaya TARUI <tarui AT prx.jp>. + +Tue Jun 8 17:45:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if + errno is not set. [ruby-dev:41317] + Tue Jun 8 17:32:37 2010 Tanaka Akira <akr@fsij.org> * pack.c (pack_pack): call rb_quad_pack to preserve RangeError. diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 09e3b393ef..677c10e3ad 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -146,6 +146,18 @@ map_charset return StringValuePtr(*code); } +NORETURN(static void rb_iconv_sys_fail(const char *s)); +static void +rb_iconv_sys_fail(const char *s) +{ + if (errno == 0) { + rb_exc_raise(iconv_fail(rb_eIconvBrokenLibrary, Qnil, Qnil, NULL, s)); + } + rb_sys_fail(s); +} + +#define rb_sys_fail(s) rb_iconv_sys_fail(s) + static iconv_t iconv_create #ifdef HAVE_PROTOTYPES @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2010-06-08" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20100608 -#define RUBY_PATCHLEVEL 285 +#define RUBY_PATCHLEVEL 286 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |