The global value false is the only instance of class FalseClass and represents a logically false value in boolean expressions. The class provides operators allowing false to participate correctly in logical expressions.
And—Returns false. obj is always evaluated as it is the argument to a method call—there is no short-circuit evaluation in this case.
Source: show
static VALUE
false_and(obj, obj2)
VALUE obj, obj2;
{
return Qfalse;
}
Exclusive Or—If obj is nil or false, returns false; otherwise, returns true.
Source: show
static VALUE
false_xor(obj, obj2)
VALUE obj, obj2;
{
return RTEST(obj2)?Qtrue:Qfalse;
}
‘nuf said...
Source: show
static VALUE
false_to_s(obj)
VALUE obj;
{
return rb_str_new2("false");
}
Source: show
# File lib/yaml/rubytypes.rb, line 393 393: def to_yaml( opts = {} ) 394: YAML::quick_emit( nil, opts ) do |out| 395: out.scalar( taguri, "false", :plain ) 396: end 397: end
Or—Returns false if obj is nil or false; true otherwise.
Source: show
static VALUE
false_or(obj, obj2)
VALUE obj, obj2;
{
return RTEST(obj2)?Qtrue:Qfalse;
}