From 8e5c3b23f2718af0b340659dac56f5e9454e2f49 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 14 Feb 2001 05:52:06 +0000 Subject: * dir.c (dir_s_glob): supprt backslash escape of metacharacters and delimiters. * dir.c (remove_backslases): remove backslashes from path before calling stat(2). * dir.c (dir_s_glob): call rb_yield directly (via push_pattern) if block is given to the method. * dir.c (push_pattern): do not call rb_ary_push; yield directly. * eval.c (blk_copy_prev): reduced ALLOC_N too much. * eval.c (frame_dup): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index e8a22def7a..0323c9fbbe 100644 --- a/eval.c +++ b/eval.c @@ -6015,7 +6015,7 @@ blk_copy_prev(block) while (block->prev) { tmp = ALLOC_N(struct BLOCK, 1); MEMCPY(tmp, block->prev, struct BLOCK, 1); - if (tmp->frame.argc > 0 && !(tmp->frame.flags & FRAME_MALLOC)) { + if (tmp->frame.argc > 0) { tmp->frame.argv = ALLOC_N(VALUE, tmp->frame.argc); MEMCPY(tmp->frame.argv, block->prev->frame.argv, VALUE, tmp->frame.argc); tmp->frame.flags |= FRAME_MALLOC; @@ -6035,11 +6035,11 @@ frame_dup(frame) struct FRAME *tmp; for (;;) { - if (frame->argc > 0 && !(frame->flags & FRAME_MALLOC)) { + if (frame->argc > 0) { argv = ALLOC_N(VALUE, frame->argc); MEMCPY(argv, frame->argv, VALUE, frame->argc); frame->argv = argv; - frame->flags = FRAME_MALLOC; + frame->flags |= FRAME_MALLOC; } frame->tmp = 0; /* should not preserve tmp */ if (!frame->prev) break; -- cgit v1.2.3