summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-15 08:16:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-15 08:16:18 +0000
commit91c24777b9b2653a7a2051288f333d271669e854 (patch)
tree926f469f7af2a273f8eb99fbd9451aa7ac5f0153
parent9065b1713076a12dd2e7cf7631848669a85ee07a (diff)
* 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_9_2@27800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/iconv/iconv.c12
-rw-r--r--version.h4
3 files changed, 19 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 08cb64fe60..4976fd5fef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat May 15 17:16:15 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]
+
Thu May 13 18:20:16 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* io.c (swallow): should use more_char() instead of fill_cbuf().
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 964cfff7a0..a25e9cb079 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -173,6 +173,18 @@ map_charset(VALUE *code)
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_raise(rb_eIconvBrokenLibrary, "%s", s);
+ }
+ rb_sys_fail(s);
+}
+
+#define rb_sys_fail(s) rb_iconv_sys_fail(s)
+
static iconv_t
iconv_create(VALUE to, VALUE from, struct rb_iconv_opt_t *opt, int *idx)
{
diff --git a/version.h b/version.h
index e12c746182..40fa7fa2e9 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2010-05-14"
+#define RUBY_RELEASE_DATE "2010-05-15"
#define RUBY_PATCHLEVEL -1
#define RUBY_VERSION_MAJOR 1
@@ -7,7 +7,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2010
#define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 14
+#define RUBY_RELEASE_DAY 15
#include "ruby/version.h"