Fix seg faults due to the use of transmute

Previously rb_string_internal used transmute to convert a magnus::RString into rb_sys::RString, but that's not actually the right conversion because these objects are not bitwise compatible. As a result, we were seeing odd issues where update_weak_map() never updated the pointers properly. This led to seg faults if the heap were dumped.

To fix this, we can simply use as_raw() to make this conversion.

Relates to #69 (closed)

Edited by Stan Hu

Merge request reports

Loading