change class argument of mrb_const_defined_at from struct RClass* to mrb_value to make it consistent with mrb_const_defined; ref #2593

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-09-19 02:51:52 +09:00
parent 6b34166ba5
commit 95c7f570e1
4 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -263,7 +263,7 @@ make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass * k
if (!is_const_id(mrb, mrb_sym2name_len(mrb, id, NULL))) {
mrb_name_error(mrb, id, "identifier %S needs to be constant", name);
}
if (mrb_const_defined_at(mrb, klass, id)) {
if (mrb_const_defined_at(mrb, mrb_obj_value(klass), id)) {
mrb_warn(mrb, "redefining constant Struct::%S", name);
/* ?rb_mod_remove_const(klass, mrb_sym2name(mrb, id)); */
}