ruby-changes:62885
From: Hiroshi <ko1@a...>
Date: Fri, 11 Sep 2020 10:53:15 +0900 (JST)
Subject: [ruby-changes:62885] e691e671ca (master): Removed Thread#safe_level
https://git.ruby-lang.org/ruby.git/commit/?id=e691e671ca From e691e671ca91d125edb636669f628d51c04aa1b2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Thu, 10 Sep 2020 21:04:00 +0900 Subject: Removed Thread#safe_level diff --git a/thread.c b/thread.c index 4b563a5..2f265c5 100644 --- a/thread.c +++ b/thread.c @@ -3269,23 +3269,6 @@ rb_thread_stop_p(VALUE thread) https://github.com/ruby/ruby/blob/trunk/thread.c#L3269 } /* - * call-seq: - * thr.safe_level -> integer - * - * Returns the safe level. - * - * This method is obsolete because $SAFE is a process global state. - * Simply check $SAFE. - */ - -static VALUE -rb_thread_safe_level(VALUE thread) -{ - rb_warn("Thread#safe_level will be removed in Ruby 3.0"); - return UINT2NUM(GET_VM()->safe_level_); -} - -/* * call-seq: * thr.name -> string * @@ -5513,7 +5496,6 @@ Init_Thread(void) https://github.com/ruby/ruby/blob/trunk/thread.c#L5496 rb_define_method(rb_cThread, "abort_on_exception=", rb_thread_abort_exc_set, 1); rb_define_method(rb_cThread, "report_on_exception", rb_thread_report_exc, 0); rb_define_method(rb_cThread, "report_on_exception=", rb_thread_report_exc_set, 1); - rb_define_method(rb_cThread, "safe_level", rb_thread_safe_level, 0); rb_define_method(rb_cThread, "group", rb_thread_group, 0); rb_define_method(rb_cThread, "backtrace", rb_thread_backtrace_m, -1); rb_define_method(rb_cThread, "backtrace_locations", rb_thread_backtrace_locations_m, -1); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/