mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_call0): binding for the return event hook should have
consistent scope. [ruby-core:07928] * eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from event_hooks. no guarantee for arbitrary hook deletion. [ruby-dev:28632] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9f54c8f8c7
commit
d4e741e89e
2 changed files with 21 additions and 7 deletions
|
@ -1,3 +1,12 @@
|
|||
Wed Jun 7 09:14:44 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_call0): binding for the return event hook should have
|
||||
consistent scope. [ruby-core:07928]
|
||||
|
||||
* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
|
||||
event_hooks. no guarantee for arbitrary hook deletion.
|
||||
[ruby-dev:28632]
|
||||
|
||||
Mon Jun 5 18:12:12 2006 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* ext/socket/socket.c (sock_s_unpack_sockaddr_in): reject
|
||||
|
|
19
eval.c
19
eval.c
|
@ -1128,11 +1128,16 @@ static rb_event_hook_t *event_hooks;
|
|||
|
||||
#define EXEC_EVENT_HOOK(event, node, self, id, klass) \
|
||||
do { \
|
||||
rb_event_hook_t *hook; \
|
||||
rb_event_hook_t *hook = event_hooks; \
|
||||
rb_event_hook_func_t hook_func; \
|
||||
rb_event_t events; \
|
||||
\
|
||||
for (hook = event_hooks; hook; hook = hook->next) { \
|
||||
if (hook->events & event) \
|
||||
(*hook->func)(event, node, self, id, klass); \
|
||||
while (hook) { \
|
||||
hook_func = hook->func; \
|
||||
events = hook->events; \
|
||||
hook = hook->next; \
|
||||
if (events & event) \
|
||||
(*hook_func)(event, node, self, id, klass); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
@ -5911,14 +5916,14 @@ rb_call0(klass, recv, id, oid, argc, argv, body, flags)
|
|||
state = 0;
|
||||
}
|
||||
POP_TAG();
|
||||
if (event_hooks) {
|
||||
EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);
|
||||
}
|
||||
POP_VARS();
|
||||
POP_CLASS();
|
||||
POP_SCOPE();
|
||||
ruby_cref = saved_cref;
|
||||
if (safe >= 0) ruby_safe_level = safe;
|
||||
if (event_hooks) {
|
||||
EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);
|
||||
}
|
||||
switch (state) {
|
||||
case 0:
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue