summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bigdecimal/bigdecimal.c4
-rw-r--r--ext/openssl/ossl.h8
-rw-r--r--ext/openssl/ossl_asn1.c4
-rw-r--r--ext/openssl/ossl_cipher.c6
-rw-r--r--ext/racc/cparse/cparse.c4
-rw-r--r--ext/syslog/syslog.c2
6 files changed, 14 insertions, 14 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 16fba22..5af8441 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2518,8 +2518,8 @@ BigDecimal_new(int argc, VALUE *argv)
case T_RATIONAL:
if (NIL_P(nFig)) {
rb_raise(rb_eArgError,
- "can't omit precision for a %s.",
- rb_class2name(CLASS_OF(iniValue)));
+ "can't omit precision for a %"PRIsVALUE".",
+ rb_obj_class(iniValue));
}
return GetVpValueWithPrec(iniValue, mf, 1);
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index 96d0ade..83a927d 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -95,15 +95,15 @@ extern VALUE eOSSLError;
*/
#define OSSL_Check_Kind(obj, klass) do {\
if (!rb_obj_is_kind_of((obj), (klass))) {\
- ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected kind of %s)",\
- rb_obj_classname(obj), rb_class2name(klass));\
+ ossl_raise(rb_eTypeError, "wrong argument (%"PRIsVALUE")! (Expected kind of %"PRIsVALUE")",\
+ rb_obj_class(obj), (klass));\
}\
} while (0)
#define OSSL_Check_Instance(obj, klass) do {\
if (!rb_obj_is_instance_of((obj), (klass))) {\
- ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected instance of %s)",\
- rb_obj_classname(obj), rb_class2name(klass));\
+ ossl_raise(rb_eTypeError, "wrong argument (%"PRIsVALUE")! (Expected instance of %"PRIsVALUE")",\
+ rb_obj_class(obj), (klass));\
}\
} while (0)
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index e3f59bf..c2344af 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -624,8 +624,8 @@ ossl_asn1_default_tag(VALUE obj)
}
tmp_class = rb_class_superclass(tmp_class);
}
- ossl_raise(eASN1Error, "universal tag for %s not found",
- rb_class2name(CLASS_OF(obj)));
+ ossl_raise(eASN1Error, "universal tag for %"PRIsVALUE" not found",
+ rb_obj_class(obj));
return -1; /* dummy */
}
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index 0337437..df6fd10 100644
--- a/ext/openssl/ossl_cipher.c
+++ b/ext/openssl/ossl_cipher.c
@@ -213,9 +213,9 @@ ossl_cipher_init(int argc, VALUE *argv, VALUE self, int mode)
* We deprecated the arguments for this method, but we decided
* keeping this behaviour for backward compatibility.
*/
- const char *cname = rb_class2name(rb_obj_class(self));
- rb_warn("arguments for %s#encrypt and %s#decrypt were deprecated; "
- "use %s#pkcs5_keyivgen to derive key and IV",
+ VALUE cname = rb_class_path(rb_obj_class(self));
+ rb_warn("arguments for %"PRIsVALUE"#encrypt and %"PRIsVALUE"#decrypt were deprecated; "
+ "use %"PRIsVALUE"#pkcs5_keyivgen to derive key and IV",
cname, cname, cname);
StringValue(pass);
GetCipher(self, ctx);
diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c
index 9bb40e7..36ad959 100644
--- a/ext/racc/cparse/cparse.c
+++ b/ext/racc/cparse/cparse.c
@@ -418,10 +418,10 @@ extract_user_token(struct cparse_params *v, VALUE block_args,
if (!RB_TYPE_P(block_args, T_ARRAY)) {
rb_raise(rb_eTypeError,
- "%s() %s %s (must be Array[2])",
+ "%s() %s %"PRIsVALUE" (must be Array[2])",
v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token",
v->lex_is_iterator ? "yielded" : "returned",
- rb_class2name(CLASS_OF(block_args)));
+ rb_obj_class(block_args));
}
if (RARRAY_LEN(block_args) != 2) {
rb_raise(rb_eArgError,
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index 17c5ef8..482a0a2 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -312,7 +312,7 @@ static VALUE mSyslog_log(int argc, VALUE *argv, VALUE self)
pri = *argv++;
if (!FIXNUM_P(pri)) {
- rb_raise(rb_eTypeError, "type mismatch: %s given", rb_class2name(CLASS_OF(pri)));
+ rb_raise(rb_eTypeError, "type mismatch: %"PRIsVALUE" given", rb_obj_class(pri));
}
syslog_write(FIX2INT(pri), argc, argv);