aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-27 13:57:14 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-27 13:57:14 +0000
commit3b8469723a7ba84eab723611d022dd4f70f3384d (patch)
treebae564eefcc17851d370372f3c25a838040fe3dc /variable.c
parentfeb3f1546d540aab60a785811b54a2a50f7759fe (diff)
downloadruby-3b8469723a7ba84eab723611d022dd4f70f3384d.tar.gz
eval.c: rename "rb_frozen_class_p" to "rb_class_modify_check"
Just refactoring. Despite its name, the function does NOT return a boolean but raises an exception when the class given is frozen. I don't think the new name "rb_class_modify_check" is the best, but it follows the precedeint "rb_ary_modify_check", and is definitely better than "*_p". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c4
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",