Ruby support #1

Open
jaroslaw wants to merge 165 commits from ruby into main
2 changed files with 4 additions and 2 deletions
Showing only changes of commit bd4b377fc6 - Show all commits

View file

@ -1,5 +1,5 @@
def test_func
rust_func.and_then lambda { |x|
$state['x'] = x
print('abc' + 5)
}
end

View file

@ -368,7 +368,9 @@ impl Runtime for RubyRuntime {
.into_iter()
.map(|x| ruby.get_inner(x.0).as_value())
.collect();
let result: magnus::Value = f.funcall("call", args.as_slice()).unwrap();
let result: magnus::Value = f.funcall("call", args.as_slice()).map_err(|e| {
ScriptingError::RuntimeError(Box::new(io::Error::other(e.to_string())))
})?;
Ok(RubyValue::new(result))
}))
}