From 27c4fb3361d0e731d2deff6093ebd33b69231323 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 3 Aug 2014 01:56:16 +0000 Subject: ext: get rid of inadvertent ID creation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_pkcs7.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/openssl/ossl_pkcs7.c') diff --git a/ext/openssl/ossl_pkcs7.c b/ext/openssl/ossl_pkcs7.c index 66c20538d8..8b1a51903c 100644 --- a/ext/openssl/ossl_pkcs7.c +++ b/ext/openssl/ossl_pkcs7.c @@ -376,7 +376,10 @@ ossl_pkcs7_sym2typeid(VALUE sym) { NULL, 0 }, }; - if (RB_TYPE_P(sym, T_SYMBOL)) s = rb_id2name(SYM2ID(sym)); + if (RB_TYPE_P(sym, T_SYMBOL)) { + sym = rb_sym2str(sym); + s = RSTRING_PTR(sym); + } else s = StringValuePtr(sym); for(i = 0; i < numberof(p7_type_tab); i++){ if(p7_type_tab[i].name == NULL) -- cgit v1.2.3