From eb0125957b3c32727a7c199f1f3041c1d2b9a475 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 7 May 2020 01:51:03 +0900 Subject: [PATCH] Share logically equivalent functions --- object.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/object.c b/object.c index d3e100d11f..2a01cbbb1e 100644 --- a/object.c +++ b/object.c @@ -1624,13 +1624,7 @@ false_and(VALUE obj, VALUE obj2) * nil or false; true otherwise. */ -static VALUE -false_or(VALUE obj, VALUE obj2) -{ - return RTEST(obj2)?Qtrue:Qfalse; -} - - +#define false_or true_and /* * call-seq: @@ -1643,11 +1637,7 @@ false_or(VALUE obj, VALUE obj2) * */ -static VALUE -false_xor(VALUE obj, VALUE obj2) -{ - return RTEST(obj2)?Qtrue:Qfalse; -} +#define false_xor true_and /* * call-seq: