summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--compar.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5828b1f..f293481 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Dec 29 07:27:51 2013 Benoit Daloze <eregontp@gmail.com>
+
+ * compar.c (cmp_eq_recursive): Fix the return value, the value for
+ failed #<=> should be nil. It was raising a NoMethodError for
+ the test case TestComparable#test_no_cmp (undefined method `>'
+ for false:FalseClass). Yet one more reason for #7688.
+
Sat Dec 28 22:21:59 2013 Benoit Daloze <eregontp@gmail.com>
* object.c (Kernel#<=>) surround Comparable operators with <code> tags.
diff --git a/compar.c b/compar.c
index 2f4db29..fa638ee 100644
--- a/compar.c
+++ b/compar.c
@@ -54,7 +54,7 @@ rb_invcmp(VALUE x, VALUE y)
static VALUE
cmp_eq_recursive(VALUE arg1, VALUE arg2, int recursive)
{
- if (recursive) return Qfalse;
+ if (recursive) return Qnil;
return rb_funcallv(arg1, cmp, 1, &arg2);
}