pub(crate) fn from_bytes(b: Vec<u8>) -> Self {
        match std::str::from_utf8(&b) {
            Ok(s) => RString::from(s),
            Err(_) => RString::Bytes(b),
        }
    }
Converts a Vec<u8> to a RString.

If a Vec<u8> is valid as UTF-8, converts to a RString::Str or ::SmallStr.
ruruby/src/value/string.rs