Skip to main content

NIL_P

Function NIL_P 

Source
pub fn NIL_P(obj: VALUE) -> bool
Expand description

Checks if the given object is nil.

  • @param[in] obj An arbitrary ruby object.
  • @retval true obj is ::RUBY_Qnil.
  • @retval false Anything else.

ยงExample

use rb_sys::special_consts::*;

assert!(NIL_P(Qnil));
assert!(!NIL_P(Qtrue));