1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm_method.c (rb_method_definition_eq): non-null definition is

not equal to null definition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-09-29 04:49:00 +00:00
parent 1fe57a4b5d
commit 16969412b3
2 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,7 @@
Tue Sep 29 13:37:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
Tue Sep 29 13:48:58 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_method.c (rb_method_definition_eq): non-null definition is
not equal to null definition.
* vm_method.c (rb_add_method_def): nothing to do if old method had
same definition. [ruby-dev:39397]

View file

@ -799,9 +799,8 @@ rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2)
static int
rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2)
{
if (!d1) {
return !d2;
}
if (d1 == d2) return 1;
if (!d1 || !d2) return 0;
if (d1->type != d2->type) {
return 0;
}