diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-27 13:57:14 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-27 13:57:14 +0000 |
commit | 3b8469723a7ba84eab723611d022dd4f70f3384d (patch) | |
tree | bae564eefcc17851d370372f3c25a838040fe3dc /class.c | |
parent | feb3f1546d540aab60a785811b54a2a50f7759fe (diff) | |
download | ruby-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 'class.c')
-rw-r--r-- | class.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -852,7 +852,7 @@ static int include_modules_at(const VALUE klass, VALUE c, VALUE module, int sear static void ensure_includable(VALUE klass, VALUE module) { - rb_frozen_class_p(klass); + rb_class_modify_check(klass); Check_Type(module, T_MODULE); if (!NIL_P(rb_refinement_module_get_refined_class(module))) { rb_raise(rb_eArgError, "refinement module is not allowed"); |