summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-09 07:55:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-09 07:55:12 +0000
commitcfdf994071fac150246d54d65a66ddeba4d53a97 (patch)
tree644f88ce8d85f5bd7b7ef8f90691588add893b0e
parentfdd3d8551ffbb1a805b5cd559314ed4be7e1c03c (diff)
Thread#safe_level
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 5c9d16967f1..0057624011f 100644
--- a/eval.c
+++ b/eval.c
@@ -7294,6 +7294,9 @@ rb_thread_safe_level(thread)
thread_t th;
th = rb_thread_check(thread);
+ if (th == curr_thread) {
+ return INT2NUM(rb_safe_level());
+ }
return INT2NUM(th->safe);
}