summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class.c b/src/class.c
index 2b42a6a92..bae69df24 100644
--- a/src/class.c
+++ b/src/class.c
@@ -1206,7 +1206,7 @@ mrb_bob_missing(mrb_state *mrb, mrb_value mod)
/* method missing in inspect; avoid recursion */
repr = mrb_any_to_s(mrb, mod);
}
- else if (mrb_respond_to(mrb, mod, inspect)) {
+ else if (mrb_respond_to(mrb, mod, inspect) && mrb->c->ci - mrb->c->cibase < 64) {
repr = mrb_funcall_argv(mrb, mod, inspect, 0, 0);
if (RSTRING_LEN(repr) > 64) {
repr = mrb_any_to_s(mrb, mod);