mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add check_const_name for Module#const_set
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user