Commit 4bfece43 authored by skandhas's avatar skandhas

add check_const_name for Module#const_set

parent 78808bf5
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment