remove unsafe
This commit is contained in:
parent
c763dd06d1
commit
f211769dc4
1 changed files with 12 additions and 14 deletions
|
|
@ -387,20 +387,18 @@ impl Runtime for RubyRuntime {
|
||||||
var.ivar_set("_current", BevyEntity(entity))
|
var.ivar_set("_current", BevyEntity(entity))
|
||||||
.expect("Failed to set current entity handle");
|
.expect("Failed to set current entity handle");
|
||||||
|
|
||||||
unsafe {
|
ruby.eval::<magnus::value::Value>(&script).map_err(|e| {
|
||||||
ruby.eval::<magnus::value::Value>(&script).map_err(|e| {
|
ScriptingError::RuntimeError(
|
||||||
ScriptingError::RuntimeError(
|
e.inspect(),
|
||||||
e.inspect(),
|
e.value()
|
||||||
e.value()
|
.unwrap()
|
||||||
.unwrap()
|
.funcall::<_, _, magnus::RArray>("backtrace", ())
|
||||||
.funcall::<_, _, magnus::RArray>("backtrace", ())
|
.unwrap()
|
||||||
.unwrap()
|
.to_vec::<String>()
|
||||||
.to_vec::<String>()
|
.unwrap()
|
||||||
.unwrap()
|
.join("\n"),
|
||||||
.join("\n"),
|
)
|
||||||
)
|
})?;
|
||||||
})?;
|
|
||||||
}
|
|
||||||
|
|
||||||
var.ivar_set("_current", ruby.qnil().as_value())
|
var.ivar_set("_current", ruby.qnil().as_value())
|
||||||
.expect("Failed to unset current entity handle");
|
.expect("Failed to unset current entity handle");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue