Sha256: 2bf663f15b841b0bd6ddcc8d9b0cb6ff9d5ccf2243c64e4037cae3a82483d9b0
Contents?: true
Size: 484 Bytes
Versions: 19
Compression:
Stored size: 484 Bytes
Contents
use magnus::RArray; #[test] fn it_converts_to_array() { let ruby = unsafe { magnus::embed::init() }; assert!(ruby.eval::<RArray>("[]").is_ok()); assert!(ruby.eval::<RArray>("[nil]").is_ok()); assert!(ruby.eval::<RArray>("[1, 2]").is_ok()); assert!(ruby.eval::<RArray>(r#"["foo", "bar", "baz"]"#).is_ok()); assert!(ruby.eval::<RArray>("nil").is_err()); assert!(ruby.eval::<RArray>("1").is_err()); assert!(ruby.eval::<RArray>(r#""foo""#).is_err()); }
Version data entries
19 entries across 19 versions & 1 rubygems