summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-10 21:04:00 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-11 10:52:52 +0900
commite691e671ca91d125edb636669f628d51c04aa1b2 (patch)
treec857b2c40d617395c8304d9048c4acc272f59949 /thread.c
parent440ab313d0a6b0eb98195dc0b8aa618844d97287 (diff)
Removed Thread#safe_level
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3531
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c18
1 files changed, 0 insertions, 18 deletions
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)
}
/*
- * 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);