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