summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-31 06:38:23 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-31 06:38:23 +0000
commitf150dbba6b1a07aeee9dc93c6da3a34c63086fb2 (patch)
tree9e46f6c36acf32aff18ec9677dcb30e6a610d44c
parentea39ef731298fafbcedb2d0b9d56a815312207af (diff)
merge revision(s) 45271: [Backport #9672]
* 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_1_9_3@45485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/openssl/ossl.c5
-rw-r--r--version.h8
3 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 808a98eb63..17715d02b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Mar 31 15:38:07 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.
+
Mon Feb 24 12:42:01 2014 Zachary Scott <e@zzak.io>
* lib/open-uri.rb: [DOC] use lower case version of core classes, same
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 2b224986e2..d0c9004a62 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -302,10 +302,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 8ae3030109..aa87e82662 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 545
+#define RUBY_PATCHLEVEL 546
-#define RUBY_RELEASE_DATE "2014-02-24"
+#define RUBY_RELEASE_DATE "2014-03-31"
#define RUBY_RELEASE_YEAR 2014
-#define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 24
+#define RUBY_RELEASE_MONTH 3
+#define RUBY_RELEASE_DAY 31
#include "ruby/version.h"