summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-14 05:52:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-14 05:52:06 +0000
commit8e5c3b23f2718af0b340659dac56f5e9454e2f49 (patch)
treec963c1e207a76f0f7f9ac2045e61f784c26a7440 /eval.c
parent22765f20155d13b6b255ad4ad7e32be1a1a052fb (diff)
* 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
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 3 insertions, 3 deletions
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;