summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-21 18:37:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-21 18:37:07 +0000
commitfa284f8127be2cccb3775309fd5747d79f55ca3d (patch)
tree013823b22a915be47194fe80078a11f9e3afe800 /object.c
parentced623cd8a69a650e6cd846788887b62906016d7 (diff)
* string.c (rb_str_equal): should return nil for non string
operand to conform comparable convention. [ruby-dev:20759] * object.c (rb_equal): preserve nil if "==" returns nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index 7e8b5e68e1..e168fa7505 100644
--- a/object.c
+++ b/object.c
@@ -42,7 +42,7 @@ rb_equal(obj1, obj2)
if (obj1 == obj2) return Qtrue;
result = rb_funcall(obj1, id_eq, 1, obj2);
if (RTEST(result)) return Qtrue;
- return Qfalse;
+ return result;
}
int