diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-28 22:28:39 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-28 22:28:39 +0000 |
commit | 7e978b1070bc12ed274a55bee4c675afc6b2c9a6 (patch) | |
tree | 8139e666c4e78edd7b1e56eb2e36f3f0ccf829b9 /compar.c | |
parent | 58a60b264deecf33a32c52fbe4a6605263ed3250 (diff) | |
download | ruby-7e978b1070bc12ed274a55bee4c675afc6b2c9a6.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compar.c')
-rw-r--r-- | compar.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |