diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-29 04:49:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-29 04:49:00 +0000 |
commit | 16969412b3def3661b7da4104609a770b1fbf898 (patch) | |
tree | bb2b149aa70cf09d38846dbf33e7b82e4d4ad505 /vm_method.c | |
parent | 1fe57a4b5d4d8673e9841f99b23d1935537a855a (diff) |
* 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
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c index 434e8424cc..808c64c47e 100644 --- a/vm_method.c +++ b/vm_method.c @@ -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; } |