summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-05 15:30:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-05 15:30:07 +0000
commit3d47068c8902ba6882d8042d15e12dac5a0dd011 (patch)
tree0cd1af76bd023d4fa92415137c0ba428555eec8d
parent143d2c0929c2df367894c9f7e5f220e438c87a5e (diff)
downloadruby-3d47068c8902ba6882d8042d15e12dac5a0dd011.tar.gz
ruby-3d47068c8902ba6882d8042d15e12dac5a0dd011.tar.xz
ruby-3d47068c8902ba6882d8042d15e12dac5a0dd011.zip
* iseq.c (insn_operand_intern): should handle Qundef embedded in
operand. [ruby-core:16656] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--iseq.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ce7364f21..1c390e274 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 6 00:29:21 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * iseq.c (insn_operand_intern): should handle Qundef embedded in
+ operand. [ruby-core:16656]
+
Tue May 6 00:00:02 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* compile.c (iseq_compile_each): should call compile_cpath() for
diff --git a/iseq.c b/iseq.c
index f475ca7a3..98eaa03c3 100644
--- a/iseq.c
+++ b/iseq.c
@@ -660,9 +660,14 @@ insn_operand_intern(rb_iseq_t *iseq,
case TS_ID: /* ID (symbol) */
op = ID2SYM(op);
case TS_VALUE: /* VALUE */
- ret = rb_inspect(op);
- if (CLASS_OF(op) == rb_cISeq) {
- rb_ary_push(child, op);
+ if (op == Qundef) {
+ ret = rb_str_new2("undef");
+ }
+ else {
+ ret = rb_inspect(op);
+ if (CLASS_OF(op) == rb_cISeq) {
+ rb_ary_push(child, op);
+ }
}
break;