Macro magnus::r_string

source ·
macro_rules! r_string {
    ($lit:expr) => { ... };
}
Expand description

Create a RString from a Rust str literal.

Examples

use magnus::{eval, r_string};

let s = r_string!("Hello, world!");
let res: bool = eval!(r#"s == "Hello, world!""#, s).unwrap();
assert!(res);