summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-24 23:17:59 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-24 23:17:59 +0000
commit2eadff346a96ccb756bd8949298a48e709edbe4f (patch)
tree543628436bd619117505cd9d05192a21ccee7bcc /iseq.c
parent418bbce88a77599672a5851f63245a4723a8a608 (diff)
* iseq.c (rb_iseq_defined_string): the index of defined_strings must
be the value of type - 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}