mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Thread#safe_level
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fdd3d8551f
commit
cfdf994071
1 changed files with 3 additions and 0 deletions
3
eval.c
3
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue