diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-08 07:49:02 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-08 07:49:02 +0000 |
commit | 5fac45dc3035a3b2930e0938d4e3e3f10b81e7a5 (patch) | |
tree | 05efd9d9f34982a5ddd24c05751901d944ee8ac1 /eval.c | |
parent | dbff56f562c9f5459deeb06263a3cc5826159062 (diff) |
* eval.c (rb_mod_s_used_modules): rename Module.used_refinements to
Module.used_modules. [Feature #7418] [ruby-core:49805]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1312,7 +1312,7 @@ mod_using(VALUE self, VALUE module) } static int -used_refinements_i(VALUE _, VALUE mod, VALUE ary) +used_modules_i(VALUE _, VALUE mod, VALUE ary) { ID id_defined_at; CONST_ID(id_defined_at, "__defined_at__"); @@ -1325,10 +1325,10 @@ used_refinements_i(VALUE _, VALUE mod, VALUE ary) /* * call-seq: - * used_refinements -> array + * used_modules -> array * - * Returns an array of all active refinements in the current scope. The - * ordering of modules in the resulting array is not defined. + * Returns an array of all modules used in the current scope. The ordering + * of modules in the resulting array is not defined. * * module A * refine Object do @@ -1342,21 +1342,21 @@ used_refinements_i(VALUE _, VALUE mod, VALUE ary) * * using A * using B - * p Module.used_refinements + * p Module.used_modules * * <em>produces:</em> * * [B, A] */ static VALUE -rb_mod_s_used_refinements(void) +rb_mod_s_used_modules(void) { const rb_cref_t *cref = rb_vm_cref(); VALUE ary = rb_ary_new(); while(cref) { if(!NIL_P(CREF_REFINEMENTS(cref))) { - rb_hash_foreach(CREF_REFINEMENTS(cref), used_refinements_i, ary); + rb_hash_foreach(CREF_REFINEMENTS(cref), used_modules_i, ary); } cref = CREF_NEXT(cref); } @@ -1698,8 +1698,8 @@ Init_eval(void) rb_define_private_method(rb_cModule, "prepend_features", rb_mod_prepend_features, 1); rb_define_private_method(rb_cModule, "refine", rb_mod_refine, 1); rb_define_private_method(rb_cModule, "using", mod_using, 1); - rb_define_singleton_method(rb_cModule, "used_refinements", - rb_mod_s_used_refinements, 0); + rb_define_singleton_method(rb_cModule, "used_modules", + rb_mod_s_used_modules, 0); rb_undef_method(rb_cClass, "refine"); rb_undef_method(rb_cClass, "module_function"); |