From dfa9eb54bd32649707914344751a758aac78e6d9 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 16 Sep 2015 11:39:29 +0000 Subject: 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 --- variable.c | 1 + 1 file changed, 1 insertion(+) (limited to 'variable.c') diff --git a/variable.c b/variable.c index 480e00777c..84eaf172c6 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())); -- cgit v1.2.3