From 0cc54369d76631b77cded2f5491cdaeb30d33ef0 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 30 Mar 2014 14:50:41 +0000 Subject: merge revision(s) r45271: [Backport #9592] [Backport #9670] * 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_0_0@45472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ ext/openssl/ossl.c | 5 +++-- version.h | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80ecd65154..f5909be542 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Mar 30 23:49:21 2014 Nobuyoshi Nakada + + * 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 Mar 20 21:13:18 2014 Eric Wong * variable.c (rb_const_set): delete existing entry on redefinition diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index 1a6b71b477..ed6153d869 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 99e3392a8d..db47584d4e 100644 --- a/version.h +++ b/version.h @@ -1,10 +1,10 @@ #define RUBY_VERSION "2.0.0" -#define RUBY_RELEASE_DATE "2014-03-22" -#define RUBY_PATCHLEVEL 462 +#define RUBY_RELEASE_DATE "2014-03-30" +#define RUBY_PATCHLEVEL 463 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 3 -#define RUBY_RELEASE_DAY 22 +#define RUBY_RELEASE_DAY 30 #include "ruby/version.h" -- cgit v1.2.3