mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
3701549796
commit
06969b6bce
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Oct 28 14:57:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* load.c (ruby_init_ext): share feature names between frame name and
|
||||
provided features.
|
||||
|
||||
Mon Oct 28 14:41:27 2013 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* misc/ruby-electric.el: Import ruby-electric.el 2.1 from
|
||||
|
|
6
load.c
6
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue