summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 86f6c4b..022a64d 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -643,11 +643,8 @@ vm_get_const_base(const VALUE *ep)
static inline void
vm_check_if_namespace(VALUE klass)
{
- VALUE str;
if (!RB_TYPE_P(klass, T_CLASS) && !RB_TYPE_P(klass, T_MODULE)) {
- str = rb_inspect(klass);
- rb_raise(rb_eTypeError, "%s is not a class/module",
- StringValuePtr(str));
+ rb_raise(rb_eTypeError, "%+"PRIsVALUE" is not a class/module", klass);
}
}