summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index f1c50b9300..2c5ccdb3d7 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1541,8 +1541,8 @@ remove_method(VALUE klass, ID mid)
rb_method_entry_t *me = 0;
VALUE self = klass;
- klass = RCLASS_ORIGIN(klass);
rb_class_modify_check(klass);
+ klass = RCLASS_ORIGIN(klass);
if (mid == object_id || mid == id__send__ || mid == idInitialize) {
rb_warn("removing `%s' may cause serious problems", rb_id2name(mid));
}