summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--iseq.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 529ad48307..7b11bfeae0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 22 20:14:28 2008 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * iseq.c (iseq_load, iseq_data_to_ary): support
+ ISEQ_TYPE_DEFINED_GUARD.
+
Thu May 22 19:01:29 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h.
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");
};