summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2025-05-04 01:47:03 +0900
committerYusuke Endoh <[email protected]>2025-05-04 02:20:42 +0900
commitf3246ccebb0ccb8667fc6f143e69ecc2a9e3fb3c (patch)
treeb2488b0539114eae6350a17c8669931fd0f0d5ba
parent2be117a97dc46b5f1e0c571d2de81b57905313d9 (diff)
Fix an ASAN error in Array#difference
[Bug #21303]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13249
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 8c75abeabf..b0a874bc83 100644
--- a/array.c
+++ b/array.c
@@ -5613,7 +5613,7 @@ rb_ary_difference_multi(int argc, VALUE *argv, VALUE ary)
VALUE elt = rb_ary_elt(ary, i);
for (j = 0; j < argc; j++) {
if (is_hash[j]) {
- if (rb_hash_stlike_lookup(argv[j], RARRAY_AREF(ary, i), NULL))
+ if (rb_hash_stlike_lookup(argv[j], elt, NULL))
break;
}
else {