summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-struct/src/struct.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-11-30 03:49:56 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2016-11-30 03:49:56 +0900
commit37743111d98558e6467f9d5e5498031b3300581f (patch)
tree07a65f680e077bbae7a3ff17a9bc4e1127907e60 /mrbgems/mruby-struct/src/struct.c
parent630733f34698047e3b7b4e66cf929f626123b14e (diff)
downloadmruby-37743111d98558e6467f9d5e5498031b3300581f.tar.gz
mruby-37743111d98558e6467f9d5e5498031b3300581f.zip
should not refer Struct class by name; fix #3296
Diffstat (limited to 'mrbgems/mruby-struct/src/struct.c')
-rw-r--r--mrbgems/mruby-struct/src/struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c
index edb6f6a0a..93bd1e2b2 100644
--- a/mrbgems/mruby-struct/src/struct.c
+++ b/mrbgems/mruby-struct/src/struct.c
@@ -287,7 +287,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass)
mrb_ary_set(mrb, rest, i, mrb_symbol_value(id));
}
}
- st = make_struct(mrb, name, rest, struct_class(mrb));
+ st = make_struct(mrb, name, rest, mrb_class_ptr(klass));
if (!mrb_nil_p(b)) {
mrb_yield_with_class(mrb, b, 1, &st, st, mrb_class_ptr(st));
}