Skip to content

Commit f3246cc

Browse files
committed
Fix an ASAN error in Array#difference
[Bug #21303]
1 parent 2be117a commit f3246cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5613,7 +5613,7 @@ rb_ary_difference_multi(int argc, VALUE *argv, VALUE ary)
56135613
VALUE elt = rb_ary_elt(ary, i);
56145614
for (j = 0; j < argc; j++) {
56155615
if (is_hash[j]) {
5616-
if (rb_hash_stlike_lookup(argv[j], RARRAY_AREF(ary, i), NULL))
5616+
if (rb_hash_stlike_lookup(argv[j], elt, NULL))
56175617
break;
56185618
}
56195619
else {

0 commit comments

Comments
 (0)