Skip to content

Commit

Permalink
add check_const_name for Module#const_defined?
Browse files Browse the repository at this point in the history
  • Loading branch information
skandhas committed Dec 3, 2012
1 parent fc89106 commit b3bb54a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit b3bb54a

Please sign in to comment.