fn accepts_same_rust_object_as_non_self_argument(ruby: &mut Ruby) {
    let mut long_name_player = Player { name: "long as shit name".to_owned(), ..Player::default() };
    let mut short_name_player = Player { name: "bar".to_owned(), ..Player::default() };

    ruby.plug("long_name_player", &mut long_name_player);
    ruby.plug("short_name_player", &mut short_name_player);

    let longest_name = Value::string(long_name_player.name);
    assert_eq!(longest_name, ruby.eval("SHORT_NAME_PLAYER.longest_name(LONG_NAME_PLAYER)").unwrap());
}
/// We should be able to pass a Player from Ruby to Rust in an argument.
We should be able to pass a Player from Ruby to Rust in an argument.
We should be able to pass a Player from Ruby to Rust in an argument .
fn accepts_same_rust_object_as_non_self_argument(ruby: &mut Ruby) {
    let mut long_name_player = Player { name: "long as shit name".to_owned(), ..Player::default() };
    let mut short_name_player = Player { name: "bar".to_owned(), ..Player::default() };
    ruby.plug("long_name_player", &mut long_name_player);
    ruby.plug("short_name_player", &mut short_name_player);
    let longest_name = Value::string(long_name_player.name);
    assert_eq!(longest_name, ruby.eval("SHORT_NAME_PLAYER.longest_name(LONG_NAME_PLAYER)").unwrap());
}
fn accepts_same_rust_object_as_non_self_argument ( ruby : & mut Ruby ) { let mut long_name_player = Player { name : " " . to_owned ( ) , .. Player :: default ( ) } ; let mut short_name_player = Player { name : " " . to_owned ( ) , .. Player :: default ( ) } ; ruby . plug ( " " , & mut long_name_player ) ; ruby . plug ( " " , & mut short_name_player ) ; let longest_name = Value :: string ( long_name_player . name ) ; assert_eq ! ( longest_name ruby eval ( " " ) unwrap ( ) ) ; }
We should be able to pass a Player from Ruby to Rust in an argument.
We should be able to pass a Player from Ruby to Rust in an argument .
ruby
&mut Ruby
ruby
&mut Ruby