Sha256: 4f092289a2b847e182b85da05a71dd1546111cac9ad549effac68a44518be75f

Contents?: true

Size: 220 Bytes

Versions: 19

Compression:

Stored size: 220 Bytes

Contents

use magnus::{block::Proc, eval};

#[test]
fn it_calls_proc() {
    let _cleanup = unsafe { magnus::embed::init() };

    let p: Proc = eval("Proc.new {|i| i + 1}").unwrap();
    assert_eq!(43, p.call((42,)).unwrap());
}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wasmtime-14.0.4 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-14.0.3 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-14.0.1 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-14.0.0 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-13.0.0 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-12.0.1 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-12.0.0 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-11.0.0 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-10.0.1 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-10.0.0 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-9.0.4 ./ext/cargo-vendor/magnus-0.5.5/tests/call_proc.rs
wasmtime-9.0.1 ./ext/cargo-vendor/magnus-0.5.3/tests/call_proc.rs
wasmtime-8.0.0 ./ext/cargo-vendor/magnus-0.5.3/tests/call_proc.rs
wasmtime-7.0.0 ./ext/cargo-vendor/magnus-0.5.2/tests/call_proc.rs
wasmtime-6.0.1 ./ext/cargo-vendor/magnus-0.5.1/tests/call_proc.rs
wasmtime-6.0.0 ./ext/cargo-vendor/magnus-0.5.1/tests/call_proc.rs
wasmtime-5.0.0 ./ext/cargo-vendor/magnus-0.4.4/tests/call_proc.rs
wasmtime-0.4.1 ./ext/cargo-vendor/magnus-0.4.4/tests/call_proc.rs
wasmtime-0.4.0 ./ext/cargo-vendor/magnus-0.4.3/tests/call_proc.rs