diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | iseq.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Fri May 23 06:15:20 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * iseq.c (rb_iseq_compile_with_option): get rid of segv. + Fri May 23 02:29:14 2008 Koichi Sasada <ko1@atdot.net> * insns.def (opt_gt|ge|lt|le): use values directly to compare. @@ -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); |