summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-29 04:49:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-29 04:49:00 +0000
commitc2a9d6b5ba59a89e54a5c2a8aba81143b7d3317b (patch)
treebb2b149aa70cf09d38846dbf33e7b82e4d4ad505
parent404dbea3d6a84853f434be53325b28146bc010ec (diff)
downloadruby-c2a9d6b5ba59a89e54a5c2a8aba81143b7d3317b.tar.gz
ruby-c2a9d6b5ba59a89e54a5c2a8aba81143b7d3317b.tar.xz
ruby-c2a9d6b5ba59a89e54a5c2a8aba81143b7d3317b.zip
* vm_method.c (rb_method_definition_eq): non-null definition is
not equal to null definition. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--vm_method.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c9c20a1b..548e0a24f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
diff --git a/vm_method.c b/vm_method.c
index 434e8424c..808c64c47 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;
}