mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* array.c (rb_ary_equal): check identiry equality first.
* string.c (rb_str_equal): ditto. * struct.c (rb_struct_equal): ditto. * numeric.c (Init_Numeric): undef Integer::new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
422b6dc8dd
commit
150daae136
6 changed files with 18 additions and 5 deletions
1
struct.c
1
struct.c
|
@ -525,6 +525,7 @@ rb_struct_equal(s, s2)
|
|||
{
|
||||
long i;
|
||||
|
||||
if (s == s2) return Qtrue;
|
||||
if (TYPE(s2) != T_STRUCT) return Qfalse;
|
||||
if (CLASS_OF(s) != CLASS_OF(s2)) return Qfalse;
|
||||
if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue