Skip to content

Commit

Permalink
* thread.c: Revert changes to Thread#raise made in r25278 [ruby-core:…
Browse files Browse the repository at this point in the history
…25367]

* eval_intern.h: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
marcandre committed Oct 12, 2009
1 parent bc59a85 commit a77a9bb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ rb_rubylevel_errinfo(void)
return get_errinfo();
}

VALUE
static VALUE
rb_threadptr_errinfo(rb_thread_t *th)
{
return get_thread_errinfo(th);
Expand Down
1 change: 0 additions & 1 deletion eval_intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ void rb_thread_terminate_all(void);
VALUE rb_vm_top_self();
VALUE rb_vm_cbase(void);
void rb_trap_restore_mask(void);
VALUE rb_threadptr_errinfo(rb_thread_t *);

#ifndef CharNext /* defined as CharNext[AW] on Windows. */
#define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
Expand Down
12 changes: 1 addition & 11 deletions thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ void rb_thread_stop_timer_thread(void);

static const VALUE eKillSignal = INT2FIX(0);
static const VALUE eTerminateSignal = INT2FIX(1);
static const VALUE eReRaiseSignal = INT2FIX(2);
static volatile int system_working = 1;

inline static void
Expand Down Expand Up @@ -1247,10 +1246,6 @@ rb_threadptr_execute_interrupts_rec(rb_thread_t *th, int sched_depth)
TH_JUMP_TAG(th, TAG_FATAL);
}
else {
if (err == eReRaiseSignal) {
err = rb_threadptr_errinfo(th);
err = rb_make_exception(NIL_P(err) ? 0 : 1, &err);
}
rb_exc_raise(err);
}
}
Expand Down Expand Up @@ -1317,12 +1312,7 @@ rb_threadptr_raise(rb_thread_t *th, int argc, VALUE *argv)
goto again;
}

if (argc == 0) {
exc = eReRaiseSignal;
}
else {
exc = rb_make_exception(argc, argv);
}
exc = rb_make_exception(argc, argv);
th->thrown_errinfo = exc;
rb_threadptr_ready(th);
return Qnil;
Expand Down

0 comments on commit a77a9bb

Please sign in to comment.