Sha256: 62ce408a8d3214247cb3cea38b552caf26cdf0c33c25be8711c1c5f5e782ee06
Contents?: true
Size: 308 Bytes
Versions: 19
Compression:
Stored size: 308 Bytes
Contents
use magnus::{prelude::*, Value}; #[test] fn it_converts_to_utf8_string() { let ruby = unsafe { magnus::embed::init() }; let val: Value = ruby .eval(r#""caf\xE9".force_encoding("ISO-8859-1")"#) .unwrap(); let s = String::try_convert(val).unwrap(); assert_eq!("café", s); }
Version data entries
19 entries across 19 versions & 1 rubygems