summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-16 11:39:29 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-16 11:39:29 (GMT)
commitdfa9eb54bd32649707914344751a758aac78e6d9 (patch)
tree7e698353405aa97ded76ebe1dd4ebc24d5cedfb5 /variable.c
parentc3a48736a6000b64967680cfbd0d5058467a767e (diff)
variable.c: fail if frozen
* variable.c (set_const_visibility): fail if the class/module is frozen. [ruby-core:70828] [Bug #11532] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/variable.c b/variable.c
index 480e007..84eaf17 100644
--- a/variable.c
+++ b/variable.c
@@ -2601,6 +2601,7 @@ set_const_visibility(VALUE mod, int argc, const VALUE *argv,
rb_const_entry_t *ce;
ID id;
+ rb_frozen_class_p(mod);
if (argc == 0) {
rb_warning("%"PRIsVALUE" with no argument is just ignored",
QUOTE_ID(rb_frame_callee()));