diff options
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 32 |
1 files changed, 0 insertions, 32 deletions
@@ -1237,37 +1237,6 @@ rb_mod_refine(VALUE module, VALUE klass) return refinement; } -static int -refinements_i(VALUE key, VALUE value, VALUE arg) -{ - rb_hash_aset(arg, key, value); - return ST_CONTINUE; -} - -/* - * call-seq: - * refinements -> hash - * - * Returns refinements in the receiver as a hash table, whose key is a - * refined class and whose value is a refinement module. - */ - -static VALUE -rb_mod_refinements(VALUE module) -{ - ID id_refinements; - VALUE refinements, result; - - CONST_ID(id_refinements, "__refinements__"); - refinements = rb_attr_get(module, id_refinements); - if (NIL_P(refinements)) { - return rb_hash_new(); - } - result = rb_hash_new(); - rb_hash_foreach(refinements, refinements_i, result); - return result; -} - void rb_obj_call_init(VALUE obj, int argc, VALUE *argv) { @@ -1619,7 +1588,6 @@ ruby_Init_refinement(void) { rb_define_private_method(rb_cModule, "refine", rb_mod_refine, 1); rb_undef_method(rb_cClass, "refine"); - rb_define_method(rb_cModule, "refinements", rb_mod_refinements, 0); rb_define_private_method(rb_singleton_class(rb_vm_top_self()), "using", top_using, 1); } |