ruby-changes:39009
From: nobu <ko1@a...>
Date: Wed, 1 Jul 2015 18:56:17 +0900 (JST)
Subject: [ruby-changes:39009] nobu:r51090 (trunk): vm_method.c: remove unused code
nobu 2015-07-01 18:55:57 +0900 (Wed, 01 Jul 2015) New Revision: 51090 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51090 Log: vm_method.c: remove unused code * vm_method.c (rb_method_entry_make): remove unused code to prohibit method re-definition, introduced at r34983. Modified files: trunk/vm_method.c Index: vm_method.c =================================================================== --- vm_method.c (revision 51089) +++ vm_method.c (revision 51090) @@ -398,9 +398,6 @@ rb_method_entry_make(VALUE klass, ID mid https://github.com/ruby/ruby/blob/trunk/vm_method.c#L398 { rb_method_entry_t *me; -#ifdef METHOD_ENTRY_NOREDEF - VALUE rklass; -#endif st_table *mtbl; st_data_t data; int make_refined = 0; @@ -422,9 +419,6 @@ rb_method_entry_make(VALUE klass, ID mid https://github.com/ruby/ruby/blob/trunk/vm_method.c#L419 } rb_frozen_class_p(klass); -#ifdef METHOD_ENTRY_NOREDEF - rklass = klass; -#endif if (FL_TEST(klass, RMODULE_IS_REFINEMENT)) { VALUE refined_class = rb_refinement_module_get_refined_class(klass); @@ -445,12 +439,6 @@ rb_method_entry_make(VALUE klass, ID mid https://github.com/ruby/ruby/blob/trunk/vm_method.c#L439 rb_method_definition_t *old_def = old_me->def; if (rb_method_definition_eq(old_def, def)) return old_me; -#ifdef METHOD_ENTRY_NOREDEF - if (METHOD_ENTRY_NOREDEF(old_me)) { - rb_raise(rb_eTypeError, "cannot redefine %"PRIsVALUE"#%"PRIsVALUE, - rb_class_name(rklass), rb_id2str(mid)); - } -#endif rb_vm_check_redefinition_opt_method(old_me, klass); if (old_def->type == VM_METHOD_TYPE_REFINED) make_refined = 1; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/