summaryrefslogtreecommitdiffhomepage
path: root/src/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/class.c')
-rw-r--r--src/class.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/class.c b/src/class.c
index 30de9553c..dcd0ae492 100644
--- a/src/class.c
+++ b/src/class.c
@@ -1483,6 +1483,8 @@ mrb_mod_const_set(mrb_state *mrb, mrb_value mod)
{
mrb_value sym, value;
mrb_get_args(mrb, "oo", &sym, &value);
+
+ check_const_name(mrb, mrb_sym_value(mrb,sym));
mrb_const_set(mrb, mod, mrb_sym_value(mrb, sym), value);
return value;
}