aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index 989a8a1120..e34537e871 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1779,11 +1779,11 @@ rb_iseq_defined_string(enum defined_type type)
defs = ruby_xcalloc(numberof(expr_names), sizeof(VALUE));
GET_VM()->defined_strings = defs;
}
- str = defs[type];
+ str = defs[type-1];
if (!str) {
str = rb_str_new_cstr(estr);;
OBJ_FREEZE(str);
- defs[type] = str;
+ defs[type-1] = str;
}
return str;
}