From 87c828e39eb49269ca367f1adaec9d07bfed8f4a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 22 May 2008 21:15:23 +0000 Subject: [PATCH] * iseq.c (rb_iseq_compile_with_option): get rid of segv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ iseq.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a0bc5259d8..ea9f685673 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri May 23 06:15:20 2008 Nobuyoshi Nakada + + * iseq.c (rb_iseq_compile_with_option): get rid of segv. + Fri May 23 02:29:14 2008 Koichi Sasada * insns.def (opt_gt|ge|lt|le): use values directly to compare. diff --git a/iseq.c b/iseq.c index 562a8ca526..030927ab37 100644 --- a/iseq.c +++ b/iseq.c @@ -443,7 +443,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE line, VALUE opt) rb_thread_t *th = GET_THREAD(); make_compile_option(&option, opt); - if (th->base_block) { + if (th->base_block && th->base_block->iseq) { return rb_iseq_new_with_opt(node, th->base_block->iseq->name, file, th->base_block->iseq->self, ISEQ_TYPE_EVAL, &option);