mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add check_const_name for Module#const_get
This commit is contained in:
@@ -1473,6 +1473,8 @@ mrb_mod_const_get(mrb_state *mrb, mrb_value mod)
|
||||
{
|
||||
mrb_value sym;
|
||||
mrb_get_args(mrb, "o", &sym);
|
||||
|
||||
check_const_name(mrb, mrb_sym_value(mrb,sym));
|
||||
return mrb_const_get(mrb, mod, mrb_sym_value(mrb, sym));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user