replace RSTRING_PTR with mrb_str_to_cstr for null-terminated