diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-28 05:57:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-28 05:57:04 +0000 |
commit | 06969b6bce13bcfc868a6dd2a0351eac9714291e (patch) | |
tree | acab13cb51aebd47eeb91accc98c25d5a2bdc4d0 /load.c | |
parent | 3701549796071f3d11930fb81494da8bde263462 (diff) | |
download | ruby-06969b6bce13bcfc868a6dd2a0351eac9714291e.tar.gz |
load.c: share feature names
* load.c (ruby_init_ext): share feature names between frame name and
provided features.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); } } |