Skip to content
This repository
Browse code

Thread.abort_on_exception= should raise SecurityError when $SAFE is 4

  • Loading branch information...
commit 2982681462a55d4fc3c099b86e62d63def80ce4c 1 parent 756cc28
Watson authored February 01, 2012

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  thread.c
2  thread.c
@@ -577,6 +577,7 @@ rb_thread_s_abort_exc(VALUE rcv, SEL sel)
577 577
 static VALUE
578 578
 rb_thread_s_abort_exc_set(VALUE self, SEL sel, VALUE val)
579 579
 {
  580
+    rb_secure(4);
580 581
     rb_vm_set_abort_on_exception(RTEST(val));
581 582
     return val;
582 583
 }
@@ -608,6 +609,7 @@ rb_thread_abort_exc(VALUE thread, SEL sel)
608 609
 static VALUE
609 610
 rb_thread_abort_exc_set(VALUE thread, SEL sel, VALUE val)
610 611
 {
  612
+    rb_secure(4);
611 613
     GetThreadPtr(thread)->abort_on_exception = RTEST(val);
612 614
     return val;
613 615
 }

0 notes on commit 2982681

Please sign in to comment.
Something went wrong with that request. Please try again.