Class: FalseClass
- Inherits:
-
Object
- Object
- FalseClass
- Defined in:
- src/object.c
Instance Method Summary collapse
-
#& ⇒ Object
And—Returns
false
. -
#^ ⇒ Object
Exclusive Or—If obj is
nil
orfalse
, returnsfalse
; otherwise, returnstrue
. -
#to_s ⇒ Object
‘nuf said…
-
#to_s ⇒ Object
‘nuf said…
-
#| ⇒ Object
Or—Returns
false
if obj isnil
orfalse
;true
otherwise.
Instance Method Details
#&(obj) ⇒ false #&(obj) ⇒ false
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.
201 202 203 204 205 |
# File 'src/object.c', line 201 static mrb_value false_and(mrb_state *mrb, mrb_value obj) { return mrb_false_value(); } |
#^(obj) ⇒ Boolean #^(obj) ⇒ Boolean
Exclusive Or—If obj is nil
or
false
, returns false
; otherwise, returns
true
.
220 221 222 223 224 225 226 227 |
# File 'src/object.c', line 220 static mrb_value false_xor(mrb_state *mrb, mrb_value obj) { mrb_bool obj2; mrb_get_args(mrb, "b", &obj2); return mrb_bool_value(obj2); } |
#to_s ⇒ Object
‘nuf said…
257 258 259 260 261 |
# File 'src/object.c', line 257 static mrb_value false_to_s(mrb_state *mrb, mrb_value obj) { return mrb_str_new_lit_frozen(mrb, "false"); } |
#to_s ⇒ Object
‘nuf said…
257 258 259 260 261 |
# File 'src/object.c', line 257 static mrb_value false_to_s(mrb_state *mrb, mrb_value obj) { return mrb_str_new_lit_frozen(mrb, "false"); } |
#|(obj) ⇒ Boolean #|(obj) ⇒ Boolean
Or—Returns false
if obj is
nil
or false
; true
otherwise.
240 241 242 243 244 245 246 247 |
# File 'src/object.c', line 240 static mrb_value false_or(mrb_state *mrb, mrb_value obj) { mrb_bool obj2; mrb_get_args(mrb, "b", &obj2); return mrb_bool_value(obj2); } |