mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
Prevent the path for copied extension from GC
This commit is contained in:
parent
3b588dab91
commit
c65f8b6370
Notes:
git
2025-11-08 01:52:04 +00:00
5
load.c
5
load.c
@ -1207,7 +1207,10 @@ load_ext(VALUE path, VALUE fname)
|
||||
loaded = rb_box_local_extension(box->box_object, fname, path);
|
||||
}
|
||||
rb_scope_visibility_set(METHOD_VISI_PUBLIC);
|
||||
return (VALUE)dln_load_feature(RSTRING_PTR(loaded), RSTRING_PTR(fname));
|
||||
void *handle = dln_load_feature(RSTRING_PTR(loaded), RSTRING_PTR(fname));
|
||||
RB_GC_GUARD(loaded);
|
||||
RB_GC_GUARD(fname);
|
||||
return (VALUE)handle;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user