Sha256: 99d291576ed4e558e2f39ec9ac9dc673c6586e3dde30afac4ab923497e0e92bf

Contents?: true

Size: 213 Bytes

Versions: 19

Compression:

Stored size: 213 Bytes

Contents

use magnus::block::Proc;

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

    let p: Proc = ruby.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-29.0.0 ./ext/cargo-vendor/magnus-0.7.1/tests/call_proc.rs
wasmtime-28.0.0 ./ext/cargo-vendor/magnus-0.7.1/tests/call_proc.rs
wasmtime-27.0.0 ./ext/cargo-vendor/magnus-0.7.1/tests/call_proc.rs
wasmtime-26.0.0 ./ext/cargo-vendor/magnus-0.7.1/tests/call_proc.rs
wasmtime-25.0.2 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-25.0.1 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-25.0.0 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-24.0.0 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-23.0.2 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-22.0.0 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-21.0.1 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-20.0.2 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-20.0.0 ./ext/cargo-vendor/magnus-0.6.4/tests/call_proc.rs
wasmtime-18.0.3 ./ext/cargo-vendor/magnus-0.6.2/tests/call_proc.rs
wasmtime-17.0.1 ./ext/cargo-vendor/magnus-0.6.2/tests/call_proc.rs
wasmtime-17.0.0 ./ext/cargo-vendor/magnus-0.6.2/tests/call_proc.rs
wasmtime-16.0.0 ./ext/cargo-vendor/magnus-0.6.2/tests/call_proc.rs
wasmtime-15.0.1 ./ext/cargo-vendor/magnus-0.6.2/tests/call_proc.rs
wasmtime-15.0.0 ./ext/cargo-vendor/magnus-0.6.2/tests/call_proc.rs