diff options
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/variable.c b/variable.c index 383fab3143..32e71fccb4 100644 --- a/variable.c +++ b/variable.c @@ -2848,7 +2848,7 @@ set_const_visibility(VALUE mod, int argc, const VALUE *argv, rb_const_entry_t *ce; ID id; - rb_frozen_class_p(mod); + rb_class_modify_check(mod); if (argc == 0) { rb_warning("%"PRIsVALUE" with no argument is just ignored", QUOTE_ID(rb_frame_callee())); @@ -2898,7 +2898,7 @@ rb_deprecate_constant(VALUE mod, const char *name) ID id; long len = strlen(name); - rb_frozen_class_p(mod); + rb_class_modify_check(mod); if (!(id = rb_check_id_cstr(name, len, NULL)) || !(ce = rb_const_lookup(mod, id))) { rb_name_err_raise("constant %2$s::%1$s not defined", |