Sha256: 63ac95cfeae189143af0920c594d9a6886ce356d40beb00ff6015731527ce23e
Contents?: true
Size: 327 Bytes
Versions: 19
Compression:
Stored size: 327 Bytes
Contents
use magnus::{eval, RString}; #[test] fn it_converts_to_ref_str() { let _cleanup = unsafe { magnus::embed::init() }; unsafe { // TODO why isn't this utf-8 on the Ruby side by default? let s: RString = eval("'hello'.encode('utf-8')").unwrap(); assert_eq!("hello", s.as_str().unwrap()); } }
Version data entries
19 entries across 19 versions & 1 rubygems