Function magnus::value::qtrue

source ·
pub fn qtrue() -> Qtrue
Expand description

Returns Ruby’s true value.

This should optimise to a constant reference.

§Panics

Panics if called from a non-Ruby thread. See Ruby::qtrue for the non-panicking version.

§Examples

use magnus::{rb_assert, value::qtrue};

rb_assert!("val == true", val = qtrue());