summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-22 11:16:40 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-22 11:16:40 +0000
commit6dbf55f1ba2d58640cbede440e81d0367dd008da (patch)
tree375f5ab452b5c3db54118cb942d1597c3bbafe12 /iseq.c
parent6f04138f75d0a0aaa3ceb891030c8277164052cc (diff)
* iseq.c (iseq_load, iseq_data_to_ary): support
ISEQ_TYPE_DEFINED_GUARD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index f6f443c21b..562a8ca526 100644
--- a/iseq.c
+++ b/iseq.c
@@ -388,6 +388,7 @@ iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt)
st_insert(type_map, ID2SYM(rb_intern("rescue")), ISEQ_TYPE_RESCUE);
st_insert(type_map, ID2SYM(rb_intern("ensure")), ISEQ_TYPE_ENSURE);
st_insert(type_map, ID2SYM(rb_intern("eval")), ISEQ_TYPE_EVAL);
+ st_insert(type_map, ID2SYM(rb_intern("defined_guard")), ISEQ_TYPE_DEFINED_GUARD);
}
if (st_lookup(type_map, type, &iseq_type) == 0) {
@@ -1000,6 +1001,7 @@ iseq_data_to_ary(rb_iseq_t *iseq)
DECL_SYMBOL(rescue);
DECL_SYMBOL(ensure);
DECL_SYMBOL(eval);
+ DECL_SYMBOL(defined_guard);
if (sym_top == 0) {
int i;
@@ -1013,6 +1015,7 @@ iseq_data_to_ary(rb_iseq_t *iseq)
INIT_SYMBOL(rescue);
INIT_SYMBOL(ensure);
INIT_SYMBOL(eval);
+ INIT_SYMBOL(defined_guard);
}
/* type */
@@ -1024,6 +1027,7 @@ iseq_data_to_ary(rb_iseq_t *iseq)
case ISEQ_TYPE_RESCUE: type = sym_rescue; break;
case ISEQ_TYPE_ENSURE: type = sym_ensure; break;
case ISEQ_TYPE_EVAL: type = sym_eval; break;
+ case ISEQ_TYPE_DEFINED_GUARD: type = sym_defined_guard; break;
default: rb_bug("unsupported iseq type");
};