use magnus::RArray; #[test] fn it_converts_to_array() { let ruby = unsafe { magnus::embed::init() }; assert!(ruby.eval::("[]").is_ok()); assert!(ruby.eval::("[nil]").is_ok()); assert!(ruby.eval::("[1, 2]").is_ok()); assert!(ruby.eval::(r#"["foo", "bar", "baz"]"#).is_ok()); assert!(ruby.eval::("nil").is_err()); assert!(ruby.eval::("1").is_err()); assert!(ruby.eval::(r#""foo""#).is_err()); }