diff --git a/array.c b/array.c index 1d536284d5..99942bc27b 100644 --- a/array.c +++ b/array.c @@ -4014,17 +4014,23 @@ rb_ary_includes(VALUE ary, VALUE item) } static VALUE -rb_ary_includes_by_eql(VALUE ary, VALUE item) +rb_ary_includes_by_hash(VALUE ary, VALUE item) { long i; - VALUE e; + VALUE e, item_hash, e_hash; + + ID id_hash = rb_intern("hash"); + + item_hash = rb_funcall(item, id_hash, 0); for (i=0; i