aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2017-05-18 15:59:38 -0700
committer卜部昌平 <shyouhei@ruby-lang.org>2019-10-09 23:46:50 +0900
commitbb71a128eb6e901d3d7deb895971a6706eb7110d (patch)
tree5a92d96b884a39c9101286bd59e97d8df6a71245 /thread.c
parent29e6782f5dbf127dc20156938af374eea9e2d74e (diff)
downloadruby-bb71a128eb6e901d3d7deb895971a6706eb7110d.tar.gz
Prefer st_is_member over st_lookup with 0
The st_is_member DEFINE has simpler semantics, for more readable code.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index ea0956eabd..eff5d39b51 100644
--- a/thread.c
+++ b/thread.c
@@ -3472,7 +3472,7 @@ rb_thread_key_p(VALUE self, VALUE key)
if (!id || local_storage == NULL) {
return Qfalse;
}
- else if (st_lookup(local_storage, id, 0)) {
+ else if (st_is_member(local_storage, id)) {
return Qtrue;
}
else {