Skip to content

Commit 47d73e1

Browse files
authored
Update Magnus to v0.8.2 (#510)
1 parent 29aad9e commit 47d73e1

4 files changed

Lines changed: 15 additions & 17 deletions

File tree

Cargo.lock

Lines changed: 7 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ winch = ["wasmtime/winch"]
2020
async-trait = "*" # Needed for `OutputLimitedBuffer`. Use wasmtime's version.
2121
bytes = "*" # Needed for `OutputLimitedBuffer`. Use wasmtime's version.
2222
lazy_static = "1.5.0"
23-
magnus = { version = "0.7", features = ["rb-sys"] }
23+
magnus = { version = "0.8", features = ["old-api", "rb-sys"] }
2424
rb-sys = { version = "*", default-features = false, features = [
2525
"stable-api-compiled-fallback",
2626
] }

ext/src/ruby_api/component/convert.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,13 @@ pub(crate) fn rb_to_component_val(
201201
.find(|case| case.name == name.as_str())
202202
.ok_or_else(|| {
203203
error!(
204-
"invalid variant case \"{}\", valid cases: {:?}",
204+
"invalid variant case \"{}\", valid cases: [{}]",
205205
name,
206-
RArray::from_iter(variant.cases().map(|c| c.name))
206+
variant
207+
.cases()
208+
.map(|c| format!("\"{}\"", c.name))
209+
.collect::<Vec<_>>()
210+
.join(", ")
207211
)
208212
})?;
209213

spec/unit/component/convert_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def call_func(name, *args)
8585
["s64", "1", TypeError, /conversion of String into Integer/],
8686
["s64", 2**64, RangeError, /too big/],
8787
["string", 1, TypeError, /conversion of Integer into String/],
88-
["string", "\xFF\xFF", EncodingError, /invalid utf-8 sequence/],
88+
["string", "\xFF\xFF", EncodingError, /invalid byte sequence in UTF-8/],
8989
["char", "ab", TypeError, /too many characters in string/],
9090
["list", nil, /no implicit conversion of NilClass into Array/],
9191
["record", {"x" => 1}, /struct field missing: y/],

0 commit comments

Comments
 (0)