aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-15 09:28:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-15 09:28:45 +0000
commit4ea616b387d50e96bac26ea5dd99812bfc717b03 (patch)
tree26aaef512e2e6f18906d627e534b67e1a0938b51 /vm_method.c
parent9fec02ad20c0c78edde6e5b00c1d3ddabcaea14b (diff)
downloadruby-4ea616b387d50e96bac26ea5dd99812bfc717b03.tar.gz
vm_method.c: check if frozen [Fix GH-1096]
* vm_method.c (set_method_visibility): should fail if the receiver is frozen. [ruby-core:71489] [Bug #11687] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c
index 1bc499f1b5..c88167434b 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1552,6 +1552,7 @@ set_method_visibility(VALUE self, int argc, const VALUE *argv, rb_method_visibil
{
int i;
+ rb_check_frozen(self);
if (argc == 0) {
rb_warning("%"PRIsVALUE" with no argument is just ignored",
QUOTE_ID(rb_frame_callee()));