diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-09-15 06:00:30 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-09-15 06:00:30 +0000 |
commit | bbf2ad4ed8a142c5fba8b5e56293006b359f9b18 (patch) | |
tree | 5cd9ec18d5f68c4092ffb4b29004289bd9fad895 /eval.c | |
parent | f57e5b0dc61aab42d2913029080d7e93cc75f71a (diff) | |
download | ruby-bbf2ad4ed8a142c5fba8b5e56293006b359f9b18.tar.gz |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -815,8 +815,8 @@ static rb_thread_t curr_thread = 0; static VALUE rb_eval _((VALUE,NODE*)); static VALUE eval _((VALUE,VALUE,VALUE,char*,int)); static NODE *compile _((VALUE, char*, int)); -static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int)); +static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int)); static VALUE rb_call _((VALUE,VALUE,ID,int,VALUE*,int)); static VALUE module_setup _((VALUE,NODE*)); @@ -2226,7 +2226,7 @@ rb_eval(self, n) else { result = Qnil; } - result = rb_yield_0(result, 0, 0, Qfalse); + result = rb_yield_0(result, 0, 0, 0); break; case NODE_RESCUE: @@ -3503,14 +3503,14 @@ VALUE rb_yield(val) VALUE val; { - return rb_yield_0(val, 0, 0, Qfalse); + return rb_yield_0(val, 0, 0, 0); } static VALUE rb_f_loop() { for (;;) { - rb_yield_0(Qnil, 0, 0, Qfalse); + rb_yield_0(Qnil, 0, 0, 0); CHECK_INTS; } return Qnil; /* dummy */ @@ -4809,7 +4809,7 @@ yield_under_i(self) PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { - result = rb_yield_0(self, self, ruby_class, Qfalse); + result = rb_yield_0(self, self, ruby_class, 0); } POP_TAG(); ruby_block = old_block; @@ -4819,7 +4819,7 @@ yield_under_i(self) } /* static block, no need to restore */ ruby_block->frame.cbase = ruby_frame->cbase; - return rb_yield_0(self, self, ruby_class, Qfalse); + return rb_yield_0(self, self, ruby_class, 0); } /* block eval under the class/module context */ @@ -5452,9 +5452,6 @@ errat_setter(val, id, var) set_backtrace(ruby_errinfo, val); } -VALUE rb_f_global_variables(); -VALUE f_instance_variables(); - static VALUE rb_f_local_variables() { @@ -7781,7 +7778,7 @@ rb_thread_yield(arg, th) rb_thread_t th; { scope_dup(ruby_block->scope); - return rb_yield_0(callargs(arg), 0, 0, Qfalse); + return rb_yield_0(callargs(arg), 0, 0, Qtrue); } static VALUE @@ -8335,7 +8332,7 @@ rb_f_catch(dmy, tag) t = rb_to_id(tag); PUSH_TAG(t); if ((state = EXEC_TAG()) == 0) { - val = rb_yield_0(tag, 0, 0, Qfalse); + val = rb_yield_0(tag, 0, 0, 0); } else if (state == TAG_THROW && t == prot_tag->dst) { val = prot_tag->retval; |