use predefined IDs
* array.c (rb_ary_equal), hash.c (hash_equal): use predefined IDs, `to_ary` and `to_hash` respectively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3c3d4e4e5
commit
7f3b12f05b
2
array.c
2
array.c
@ -3759,7 +3759,7 @@ rb_ary_equal(VALUE ary1, VALUE ary2)
|
||||
{
|
||||
if (ary1 == ary2) return Qtrue;
|
||||
if (!RB_TYPE_P(ary2, T_ARRAY)) {
|
||||
if (!rb_respond_to(ary2, rb_intern("to_ary"))) {
|
||||
if (!rb_respond_to(ary2, idTo_ary)) {
|
||||
return Qfalse;
|
||||
}
|
||||
return rb_equal(ary2, ary1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user