diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-07 01:03:08 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-07 01:03:08 +0000 |
| commit | f5c9f300d5e1c9165ce23fcee7c2bdc7703fad20 (patch) | |
| tree | ff56571a7415ce2f29b80988d3b27cacde4a59dd | |
| parent | df1c4181931663813537c17fb696e0a7a59547f0 (diff) | |
| download | ruby-f5c9f300d5e1c9165ce23fcee7c2bdc7703fad20.tar.gz ruby-f5c9f300d5e1c9165ce23fcee7c2bdc7703fad20.tar.xz ruby-f5c9f300d5e1c9165ce23fcee7c2bdc7703fad20.zip | |
* eval.c (rb_yield_0): should enable trace for non-cfunc nodes.
[ruby-dev:18645]
* eval.c (blk_orphan): a block created in a different thread is
orphan. [ruby-dev:17471]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | eval.c | 9 |
2 files changed, 13 insertions, 4 deletions
@@ -1,3 +1,11 @@ +Thu Nov 7 09:51:37 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> + + * eval.c (rb_yield_0): should enable trace for non-cfunc nodes. + [ruby-dev:18645] + + * eval.c (blk_orphan): a block created in a different thread is + orphan. [ruby-dev:17471] + Tue Nov 5 00:46:04 2002 Akinori MUSHA <knu@iDaemons.org> * ext/extmk.rb: Properly pass the given target to @@ -3794,6 +3794,7 @@ rb_yield_0(val, self, klass, pcall) int pcall; { NODE *node; + volatile int old_tracing = tracing; volatile VALUE result = Qnil; volatile VALUE old_cref; volatile VALUE old_wrapper; @@ -3876,6 +3877,7 @@ rb_yield_0(val, self, klass, pcall) result = (*node->nd_cfnc)(val, node->nd_tval, self); } else { + ENABLE_TRACE(); result = rb_eval(self, node); } } @@ -3901,6 +3903,7 @@ rb_yield_0(val, self, klass, pcall) } POP_TAG(); POP_ITER(); + tracing = old_tracing; pop_state: POP_CLASS(); if (ruby_dyna_vars && (block->flags & BLOCK_D_SCOPE) && @@ -6544,10 +6547,8 @@ static int blk_orphan(data) struct BLOCK *data; { - if (!(data->scope->flags & SCOPE_NOSTACK)) { - return 0; - } - if ((data->tag->flags & BLOCK_ORPHAN)) { + if ((data->tag->flags & BLOCK_ORPHAN) && + (data->scope->flags & SCOPE_NOSTACK)) { return 1; } if (data->orig_thread != rb_thread_current()) { |
