43449.patch 506 B

123456789101112131415161718
  1. Index: load.c
  2. ===================================================================
  3. --- a/load.c (revision 43448)
  4. +++ b/load.c (revision 43449)
  5. @@ -1013,9 +1013,11 @@
  6. {
  7. char* const lock_key = load_lock(name);
  8. if (lock_key) {
  9. + VALUE feature = rb_usascii_str_new_cstr(name);
  10. + OBJ_FREEZE(feature);
  11. rb_vm_call_cfunc(rb_vm_top_self(), init_ext_call, (VALUE)init,
  12. - 0, rb_str_new2(name));
  13. - rb_provide(name);
  14. + 0, feature);
  15. + rb_provide_feature(feature);
  16. load_unlock(lock_key, 1);
  17. }
  18. }