Skip to content

Commit

Permalink
Thread.abort_on_exception= should raise SecurityError when $SAFE is 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Feb 1, 2012
1 parent 756cc28 commit 2982681
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ rb_thread_s_abort_exc(VALUE rcv, SEL sel)
static VALUE
rb_thread_s_abort_exc_set(VALUE self, SEL sel, VALUE val)
{
rb_secure(4);
rb_vm_set_abort_on_exception(RTEST(val));
return val;
}
Expand Down Expand Up @@ -608,6 +609,7 @@ rb_thread_abort_exc(VALUE thread, SEL sel)
static VALUE
rb_thread_abort_exc_set(VALUE thread, SEL sel, VALUE val)
{
rb_secure(4);
GetThreadPtr(thread)->abort_on_exception = RTEST(val);
return val;
}
Expand Down

0 comments on commit 2982681

Please sign in to comment.