1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use rb_equal

It can be optimized and handles Qnil properly.
This commit is contained in:
Nobuyoshi Nakada 2021-07-22 23:46:03 +09:00
parent 4da07ac2f3
commit b726c4ee38
Notes: git 2021-07-23 10:26:02 +09:00

2
gc.c
View file

@ -3938,7 +3938,7 @@ define_final0(VALUE obj, VALUE block)
for (i = 0; i < len; i++) {
VALUE recv = RARRAY_AREF(table, i);
if (rb_funcall(recv, idEq, 1, block)) {
if (rb_equal(recv, block)) {
block = recv;
goto end;
}