mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (call_trace_func): clear exception flag temporarily.
[ruby-dev:21090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d6653222e9
commit
685082d06f
2 changed files with 13 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Aug 3 19:25:28 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (call_trace_func): clear exception flag temporarily.
|
||||||
|
[ruby-dev:21090]
|
||||||
|
|
||||||
Sun Aug 3 18:03:44 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
Sun Aug 3 18:03:44 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
* regex.h (re_mbctab): should refer to RUBY_EXPORT. [ruby-ext:02199]
|
* regex.h (re_mbctab): should refer to RUBY_EXPORT. [ruby-ext:02199]
|
||||||
|
|
18
eval.c
18
eval.c
|
@ -419,7 +419,7 @@ remove_method(klass, mid)
|
||||||
rb_warn("removing `%s' may cause serious problem", rb_id2name(mid));
|
rb_warn("removing `%s' may cause serious problem", rb_id2name(mid));
|
||||||
}
|
}
|
||||||
if (!st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body) ||
|
if (!st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body) ||
|
||||||
!body->nd_body) {
|
!body->nd_body) {
|
||||||
rb_name_error(mid, "method `%s' not defined in %s",
|
rb_name_error(mid, "method `%s' not defined in %s",
|
||||||
rb_id2name(mid), rb_class2name(klass));
|
rb_id2name(mid), rb_class2name(klass));
|
||||||
}
|
}
|
||||||
|
@ -1225,7 +1225,7 @@ static void rb_thread_cleanup _((void));
|
||||||
static void rb_thread_wait_other_threads _((void));
|
static void rb_thread_wait_other_threads _((void));
|
||||||
|
|
||||||
static int thread_set_raised();
|
static int thread_set_raised();
|
||||||
static void thread_reset_raised();
|
static int thread_reset_raised();
|
||||||
|
|
||||||
static VALUE exception_error;
|
static VALUE exception_error;
|
||||||
static VALUE sysstack_error;
|
static VALUE sysstack_error;
|
||||||
|
@ -2228,7 +2228,7 @@ call_trace_func(event, node, self, id, klass)
|
||||||
ID id;
|
ID id;
|
||||||
VALUE klass; /* OK */
|
VALUE klass; /* OK */
|
||||||
{
|
{
|
||||||
int state;
|
int state, raised;
|
||||||
struct FRAME *prev;
|
struct FRAME *prev;
|
||||||
NODE *node_save;
|
NODE *node_save;
|
||||||
VALUE srcfile;
|
VALUE srcfile;
|
||||||
|
@ -2263,6 +2263,7 @@ call_trace_func(event, node, self, id, klass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PUSH_TAG(PROT_NONE);
|
PUSH_TAG(PROT_NONE);
|
||||||
|
raised = thread_reset_raised();
|
||||||
if ((state = EXEC_TAG()) == 0) {
|
if ((state = EXEC_TAG()) == 0) {
|
||||||
srcfile = rb_str_new2(ruby_sourcefile?ruby_sourcefile:"(ruby)");
|
srcfile = rb_str_new2(ruby_sourcefile?ruby_sourcefile:"(ruby)");
|
||||||
proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event),
|
proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event),
|
||||||
|
@ -2273,6 +2274,7 @@ call_trace_func(event, node, self, id, klass)
|
||||||
klass),
|
klass),
|
||||||
Qundef, 0);
|
Qundef, 0);
|
||||||
}
|
}
|
||||||
|
if (raised) thread_set_raised();
|
||||||
POP_TMPTAG(); /* do not propagate retval */
|
POP_TMPTAG(); /* do not propagate retval */
|
||||||
POP_FRAME();
|
POP_FRAME();
|
||||||
|
|
||||||
|
@ -3266,7 +3268,6 @@ rb_eval(self, n)
|
||||||
else {
|
else {
|
||||||
result = rb_funcall(klass, node->nd_mid, 0, 0);
|
result = rb_funcall(klass, node->nd_mid, 0, 0);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -7577,11 +7578,6 @@ bmcall(args, method)
|
||||||
return method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
|
return method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct proc_funcall_data {
|
|
||||||
VALUE (*func)(ANYARGS);
|
|
||||||
VALUE val;
|
|
||||||
};
|
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_proc_new(func, val)
|
rb_proc_new(func, val)
|
||||||
VALUE (*func)(ANYARGS); /* VALUE yieldarg[, VALUE procarg] */
|
VALUE (*func)(ANYARGS); /* VALUE yieldarg[, VALUE procarg] */
|
||||||
|
@ -7946,10 +7942,12 @@ thread_set_raised()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
thread_reset_raised()
|
thread_reset_raised()
|
||||||
{
|
{
|
||||||
|
if (!(curr_thread->flags & THREAD_RAISED)) return 0;
|
||||||
curr_thread->flags &= ~THREAD_RAISED;
|
curr_thread->flags &= ~THREAD_RAISED;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rb_thread_ready _((rb_thread_t));
|
static void rb_thread_ready _((rb_thread_t));
|
||||||
|
|
Loading…
Reference in a new issue