Skip to content

Commit a1cb97c

Browse files
author
Adam
committed
Update magnus 0.8
1 parent 5dbdaa0 commit a1cb97c

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build]
2+
# Include dead code when static-linking magnus
3+
rustflags = ["-C", "link-dead-code=on"]

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ mlua = { version = "0.11.5", features = [
3131
"vendored",
3232
"send",
3333
], optional = true }
34-
magnus = { version = "0.8.2", features = ["old-api"], optional = true }
35-
rb-sys = { version = "0.9", default-features = false, features = ["link-ruby", "ruby-static"], optional = true }
34+
magnus = { version = "0.8.2", optional = true }
35+
rb-sys = { version = "*", default-features = false, features = ["ruby-static"], optional = true }
3636
crossbeam-channel = "0.5.15"
3737
libc = "0.2.172"
3838

src/runtimes/ruby.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ fn then(r_self: magnus::Value) -> magnus::Value {
171171
}
172172
.as_value(),
173173
))
174-
.into_value_with(ruby)
174+
.into_value_with(&ruby)
175175
}
176176

177177
#[derive(Clone, Debug)]
@@ -448,11 +448,11 @@ impl Runtime for RubyRuntime {
448448
let result = f(
449449
(),
450450
args.iter()
451-
.map(|arg| RubyValue::new(arg.into_value_with(ruby)))
451+
.map(|arg| RubyValue::new(arg.into_value_with(&ruby)))
452452
.collect(),
453453
)
454454
.expect("failed to call callback");
455-
result.into_value_with(ruby)
455+
result.into_value_with(&ruby)
456456
}
457457

458458
self.execute_in_thread(Box::new(move |ruby: &Ruby| {

0 commit comments

Comments
 (0)