summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-01 09:55:57 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-01 09:55:57 (GMT)
commit051a74991971060f310c875f141fa4778424fd8b (patch)
treeee783326792cdc50819aaf3600dc64e447eb9a30 /vm_method.c
parente13f05f9e65e414f2fcb9d31445da1aaf7907b8a (diff)
vm_method.c: remove unused code
* vm_method.c (rb_method_entry_make): remove unused code to prohibit method re-definition, introduced at r34983. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/vm_method.c b/vm_method.c
index d1992a9..d9c0b4f 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -398,9 +398,6 @@ rb_method_entry_make(VALUE klass, ID mid, VALUE defined_class, rb_method_visibil
{
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, VALUE defined_class, rb_method_visibil
}
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, VALUE defined_class, rb_method_visibil
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;