Sha256: 1f9725be6ab1ed89a7c67816c1f351b397e4aa35102ceb14cda31d07b6464c7a

Contents?: true

Size: 246 Bytes

Versions: 19

Compression:

Stored size: 246 Bytes

Contents

#[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());
}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/magnus-0.7.1/tests/bytes.rs
wasmtime-28.0.0 ./ext/cargo-vendor/magnus-0.7.1/tests/bytes.rs
wasmtime-27.0.0 ./ext/cargo-vendor/magnus-0.7.1/tests/bytes.rs
wasmtime-26.0.0 ./ext/cargo-vendor/magnus-0.7.1/tests/bytes.rs
wasmtime-25.0.2 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-25.0.1 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-25.0.0 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-24.0.0 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-23.0.2 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-22.0.0 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-21.0.1 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-20.0.2 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-20.0.0 ./ext/cargo-vendor/magnus-0.6.4/tests/bytes.rs
wasmtime-18.0.3 ./ext/cargo-vendor/magnus-0.6.2/tests/bytes.rs
wasmtime-17.0.1 ./ext/cargo-vendor/magnus-0.6.2/tests/bytes.rs
wasmtime-17.0.0 ./ext/cargo-vendor/magnus-0.6.2/tests/bytes.rs
wasmtime-16.0.0 ./ext/cargo-vendor/magnus-0.6.2/tests/bytes.rs
wasmtime-15.0.1 ./ext/cargo-vendor/magnus-0.6.2/tests/bytes.rs
wasmtime-15.0.0 ./ext/cargo-vendor/magnus-0.6.2/tests/bytes.rs