diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-09-19 02:51:52 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-09-19 02:51:52 +0900 |
| commit | 95c7f570e10d40deca74e69a197219622e249c01 (patch) | |
| tree | 15e92a12b65e55c3f6270c094b40d95d8402b290 /mrbgems/mruby-struct | |
| parent | 6b34166ba58fa8503a6a7805d39dd29c4b3c8445 (diff) | |
| download | mruby-95c7f570e10d40deca74e69a197219622e249c01.tar.gz mruby-95c7f570e10d40deca74e69a197219622e249c01.zip | |
change class argument of mrb_const_defined_at from `struct RClass*` to `mrb_value` to make it consistent with mrb_const_defined; ref #2593
Diffstat (limited to 'mrbgems/mruby-struct')
| -rw-r--r-- | mrbgems/mruby-struct/src/struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c index 0c1016b4c..420052e4d 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -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)); */ } |
