diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-09-10 21:04:00 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-09-11 10:52:52 +0900 |
commit | e691e671ca91d125edb636669f628d51c04aa1b2 (patch) | |
tree | c857b2c40d617395c8304d9048c4acc272f59949 | |
parent | 440ab313d0a6b0eb98195dc0b8aa618844d97287 (diff) |
Removed Thread#safe_level
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3531
-rw-r--r-- | thread.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -3269,23 +3269,6 @@ rb_thread_stop_p(VALUE thread) } /* - * 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) 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); |