summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-01 15:23:08 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-01 15:23:08 +0000
commit49fed34108ed181fa43f6396d9ff19c7243d2bf6 (patch)
treecde89ff3185fdc572bc5197cf21f077a2dc71f50
parentf2013ff844a456cdf81d74c4ac9b229d35bcec2a (diff)
merge revision(s) r45271: [Backport #9592] [Backport #9671]
* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown error reasons with old OpenSSL, and insert a colon iff formatted message is not empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/openssl/ossl.c5
-rw-r--r--version.h6
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index cee32095ca..b03e17ebb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri May 2 00:19:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
+ error reasons with old OpenSSL, and insert a colon iff formatted
+ message is not empty.
+
Thu May 1 20:56:56 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 3961d3ea33..50f1db7cf7 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -311,10 +311,11 @@ ossl_make_error(VALUE exc, const char *fmt, va_list args)
else
msg = ERR_reason_error_string(e);
if (NIL_P(str)) {
- str = rb_str_new_cstr(msg);
+ if (msg) str = rb_str_new_cstr(msg);
}
else {
- rb_str_cat2(rb_str_cat2(str, ": "), msg);
+ if (RSTRING_LEN(str)) rb_str_cat2(str, ": ");
+ rb_str_cat2(str, msg ? msg : "(null)");
}
}
if (dOSSL == Qtrue){ /* show all errors on the stack */
diff --git a/version.h b/version.h
index b033e58c7a..90c452302b 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.1.2"
-#define RUBY_RELEASE_DATE "2014-05-01"
-#define RUBY_PATCHLEVEL 82
+#define RUBY_RELEASE_DATE "2014-05-02"
+#define RUBY_PATCHLEVEL 83
#define RUBY_RELEASE_YEAR 2014
#define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 1
+#define RUBY_RELEASE_DAY 2
#include "ruby/version.h"