1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Share logically equivalent functions

This commit is contained in:
Nobuyoshi Nakada 2020-05-07 01:51:03 +09:00
parent 2273af56db
commit eb0125957b
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -1624,13 +1624,7 @@ false_and(VALUE obj, VALUE obj2)
* <code>nil</code> or <code>false</code>; <code>true</code> otherwise. * <code>nil</code> or <code>false</code>; <code>true</code> otherwise.
*/ */
static VALUE #define false_or true_and
false_or(VALUE obj, VALUE obj2)
{
return RTEST(obj2)?Qtrue:Qfalse;
}
/* /*
* call-seq: * call-seq:
@ -1643,11 +1637,7 @@ false_or(VALUE obj, VALUE obj2)
* *
*/ */
static VALUE #define false_xor true_and
false_xor(VALUE obj, VALUE obj2)
{
return RTEST(obj2)?Qtrue:Qfalse;
}
/* /*
* call-seq: * call-seq: