End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
TrueClass#^
true ^ obj → !obj
object.c
View on GitHub ↗
static VALUE
true_xor(VALUE obj, VALUE obj2)
{
return RTEST(obj2)?Qfalse:Qtrue;
}
Exclusive Or—Returns true if obj is nil or false, false otherwise.