summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-12 08:13:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-12 08:13:28 +0000
commitb41909f603dce3c8f48d49514c50d6813a1ca491 (patch)
tree4d3b74fb148cec78c9940017a013179079151c98 /vm_method.c
parent94ee7c47cd5f818eb72cc9830bfcf23a642bff3f (diff)
vm_method.c: should not modify frozen objects
* vm_method.c (rb_method_entry_make, remove_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_method.c b/vm_method.c
index 74dafab..60b7dc0 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -271,7 +271,7 @@ rb_method_entry_make(VALUE klass, ID mid, rb_method_type_t type,
}
}
- rb_check_frozen(klass);
+ rb_frozen_class_p(klass);
#if NOEX_NOREDEF
rklass = klass;
#endif
@@ -746,7 +746,7 @@ remove_method(VALUE klass, ID mid)
VALUE self = klass;
klass = RCLASS_ORIGIN(klass);
- rb_check_frozen(klass);
+ rb_frozen_class_p(klass);
if (mid == object_id || mid == id__send__ || mid == idInitialize) {
rb_warn("removing `%s' may cause serious problems", rb_id2name(mid));
}