1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2002-11-07 01:03:08 +00:00
parent 3a86596df1
commit 2b82367a47
2 changed files with 13 additions and 4 deletions

View file

@ -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

9
eval.c
View file

@ -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()) {