From 1ab8a925beec7cdce7669bcb7ee6fb16342b33fd Mon Sep 17 00:00:00 2001 From: shyouhei Date: Tue, 8 Jun 2010 08:45:59 +0000 Subject: merge revision(s) 27799:27805: * ext/iconv/iconv.c (rb_iconv_sys_fail): fix number of arguments. a patch by Masaya TARUI . * ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if errno is not set. [ruby-dev:41317] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@28221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ++++++++++ ext/iconv/iconv.c | 12 ++++++++++++ version.h | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 66123e2a57..037e98ad13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Tue Jun 8 17:45:36 2010 Nobuyoshi Nakada + + * ext/iconv/iconv.c (rb_iconv_sys_fail): fix number of arguments. + a patch by Masaya TARUI . + +Tue Jun 8 17:45:36 2010 Nobuyoshi Nakada + + * 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 * 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 diff --git a/version.h b/version.h index 2aee616c2c..dfebee7857 100644 --- a/version.h +++ b/version.h @@ -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 -- cgit v1.2.3