magnus 0.7.1

High level Ruby bindings. Write Ruby extension gems in Rust, or call Ruby code from a Rust binary.
Documentation
1
2
3
4
5
6
7
8
9
#[test]
fn it_converts_to_bytes() {
    use magnus::RString;

    let ruby = unsafe { magnus::embed::init() };

    let s: RString = ruby.eval("[0,0,0].pack('c*')").unwrap();
    assert_eq!(bytes::Bytes::from_static(&[0, 0, 0]), s.to_bytes());
}