summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl_ssl.c6
-rw-r--r--ext/socket/ancdata.c2
-rw-r--r--ext/socket/option.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 881057fb445..eaa3dfa2e1b 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -174,13 +174,13 @@ ossl_sslctx_set_ssl_version(VALUE self, VALUE ssl_method)
{
SSL_METHOD *method = NULL;
const char *s;
+ VALUE m = ssl_method;
int i;
SSL_CTX *ctx;
if (RB_TYPE_P(ssl_method, T_SYMBOL))
- s = rb_id2name(SYM2ID(ssl_method));
- else
- s = StringValuePtr(ssl_method);
+ m = rb_sym2str(ssl_method);
+ s = StringValuePtr(m);
for (i = 0; i < numberof(ossl_ssl_method_tab); i++) {
if (strcmp(ossl_ssl_method_tab[i].name, s) == 0) {
method = ossl_ssl_method_tab[i].func();
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index da8b8160d2b..9a31cc41e29 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -990,7 +990,7 @@ ancillary_inspect(VALUE self)
vtype = ip_cmsg_type_to_sym(level, type);
if (SYMBOL_P(vtype))
- rb_str_catf(ret, " %s", rb_id2name(SYM2ID(vtype)));
+ rb_str_catf(ret, " %"PRIsVALUE, rb_sym2str(vtype));
else
rb_str_catf(ret, " cmsg_type:%d", type);
}
diff --git a/ext/socket/option.c b/ext/socket/option.c
index b00ffb910c0..db7ab8252da 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -1244,7 +1244,7 @@ sockopt_inspect(VALUE self)
v = optname_to_sym(level, optname);
if (SYMBOL_P(v))
- rb_str_catf(ret, " %s", rb_id2name(SYM2ID(v)));
+ rb_str_catf(ret, " %"PRIsVALUE, rb_sym2str(v));
else
rb_str_catf(ret, " optname:%d", optname);
}