From 1a7e7bb2d1dd507a6fdf883548633bdd14bf6854 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 7 Oct 2022 14:44:13 +0200 Subject: object.c: rb_eql returns int not VALUE It works, but assumes `Qfalse == 0`, which is true today but might not be forever. --- object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 2328b20757..c47d9ab3b2 100644 --- a/object.c +++ b/object.c @@ -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); } /** -- cgit v1.2.1