summaryrefslogtreecommitdiff
path: root/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/symbol.c b/symbol.c
index 63064d3b5f..9fbe3dda74 100644
--- a/symbol.c
+++ b/symbol.c
@@ -963,9 +963,8 @@ rb_check_id(volatile VALUE *namep)
else if (!RB_TYPE_P(name, T_STRING)) {
tmp = rb_check_string_type(name);
if (NIL_P(tmp)) {
- tmp = rb_inspect(name);
- rb_raise(rb_eTypeError, "%s is not a symbol nor a string",
- RSTRING_PTR(tmp));
+ rb_raise(rb_eTypeError, "%+"PRIsVALUE" is not a symbol nor a string",
+ name);
}
name = tmp;
*namep = name;
@@ -996,9 +995,8 @@ rb_check_symbol(volatile VALUE *namep)
else if (!RB_TYPE_P(name, T_STRING)) {
tmp = rb_check_string_type(name);
if (NIL_P(tmp)) {
- tmp = rb_inspect(name);
- rb_raise(rb_eTypeError, "%s is not a symbol nor a string",
- RSTRING_PTR(tmp));
+ rb_raise(rb_eTypeError, "%+"PRIsVALUE" is not a symbol nor a string",
+ name);
}
name = tmp;
*namep = name;