summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
Diffstat (limited to 'load.c')
-rw-r--r--load.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/load.c b/load.c
index c5dd4e7..327e099 100644
--- a/load.c
+++ b/load.c
@@ -1013,9 +1013,11 @@ ruby_init_ext(const char *name, void (*init)(void))
{
char* const lock_key = load_lock(name);
if (lock_key) {
+ VALUE feature = rb_usascii_str_new_cstr(name);
+ OBJ_FREEZE(feature);
rb_vm_call_cfunc(rb_vm_top_self(), init_ext_call, (VALUE)init,
- 0, rb_str_new2(name));
- rb_provide(name);
+ 0, feature);
+ rb_provide_feature(feature);
load_unlock(lock_key, 1);
}
}