diff options
author | Jean Boussier <[email protected]> | 2022-10-07 14:44:13 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2022-10-10 11:35:16 +0200 |
commit | 1a7e7bb2d1dd507a6fdf883548633bdd14bf6854 (patch) | |
tree | 304d04ae8b2fe3ee95b12c38b8e346ddb6359f72 /object.c | |
parent | f1c89c81478d3520fec6b34ec2d411a1e85b7769 (diff) |
object.c: rb_eql returns int not VALUE
It works, but assumes `Qfalse == 0`, which is true today
but might not be forever.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6508
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -134,12 +134,12 @@ rb_eql(VALUE obj1, VALUE obj2) { VALUE result; - if (obj1 == obj2) return Qtrue; + if (obj1 == obj2) return TRUE; result = rb_eql_opt(obj1, obj2); if (result == Qundef) { result = rb_funcall(obj1, id_eql, 1, obj2); } - return RBOOL(RTEST(result)); + return RTEST(result); } /** |