Ruby support #1

Open
jaroslaw wants to merge 165 commits from ruby into main
Showing only changes of commit 19bb6514ed - Show all commits

View file

@ -493,13 +493,13 @@ mod ruby_tests {
type ScriptData = RubyScriptData; type ScriptData = RubyScriptData;
fn assert_state_key_value_i64(world: &World, _entity_id: Entity, key: &str, value: i64) { fn assert_state_key_value_i64(world: &World, _entity_id: Entity, key: &str, value: i64) {
// let runtime = world.get_resource::<RubyRuntime>().unwrap(); let runtime = world.get_resource::<RubyRuntime>().unwrap();
// let key = key.to_string(); let key = key.to_string();
// runtime.with_engine(move |engine| { runtime.with_engine(move |engine| {
// let state: magnus::value::Value = engine.class_object().const_get("STATE").unwrap(); let state: magnus::value::Value = engine.class_object().const_get("STATE").unwrap();
// let res: i64 = state.funcall_public("[]", (key,)).unwrap(); let res: i64 = state.funcall_public("[]", (key,)).unwrap();
// assert_eq!(res, value) assert_eq!(res, value)
// }) })
} }
fn assert_state_key_value_i32(world: &World, _entity_id: Entity, key: &str, value: i32) { fn assert_state_key_value_i32(world: &World, _entity_id: Entity, key: &str, value: i32) {