summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 15dea98b3c..52d89a01a9 100644
--- a/thread.c
+++ b/thread.c
@@ -3112,7 +3112,8 @@ rb_thread_stop_p(VALUE thread)
static VALUE
rb_thread_safe_level(VALUE thread)
{
- return UINT2NUM(rb_safe_level());
+ rb_warn("Thread#safe_level will be removed in Ruby 3.0");
+ return UINT2NUM(GET_VM()->safe_level_);
}
/*