diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2017-05-18 15:59:38 -0700 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-10-09 23:46:50 +0900 |
commit | bb71a128eb6e901d3d7deb895971a6706eb7110d (patch) | |
tree | 5a92d96b884a39c9101286bd59e97d8df6a71245 /class.c | |
parent | 29e6782f5dbf127dc20156938af374eea9e2d74e (diff) |
Prefer st_is_member over st_lookup with 0
The st_is_member DEFINE has simpler semantics, for more readable code.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/1622
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1176,7 +1176,7 @@ method_entry_i(ID key, VALUE value, void *data) if (!me) return ID_TABLE_CONTINUE; if (!arg->recur && me->owner != owner) return ID_TABLE_CONTINUE; } - if (!st_lookup(arg->list, key, 0)) { + if (!st_is_member(arg->list, key)) { if (UNDEFINED_METHOD_ENTRY_P(me)) { type = METHOD_VISI_UNDEF; /* none */ } |