1
0
Fork 0
mirror of https://github.com/rubyjs/mini_racer synced 2023-03-27 23:21:28 -04:00

FIX: use rb_str_intern for symbol support

This avoids leaking symbols cause rb_inter_str never releases memory.
This commit is contained in:
Sam Saffron 2021-08-18 16:42:22 +10:00
parent 05c27e8e54
commit 6c7abc4791
No known key found for this signature in database
GPG key ID: B9606168D2FFD9F5

View file

@ -626,7 +626,7 @@ static VALUE convert_v8_to_ruby(Isolate* isolate, Local<Context> context,
rb_enc_find("utf-8")
);
return ID2SYM(rb_intern_str(str_symbol));
return rb_str_intern(str_symbol);
}
MaybeLocal<String> rstr_maybe = value->ToString(context);