diff options
| author | Tomoyuki Sahara <[email protected]> | 2014-03-19 01:08:46 +0900 |
|---|---|---|
| committer | Tomoyuki Sahara <[email protected]> | 2014-03-19 01:08:46 +0900 |
| commit | 40c18fca77175a9e2882baa1975d4460412a4d28 (patch) | |
| tree | 1a72a6a265f5a54be0b3f5bb257b201a848b4e01 /mrbgems/mruby-struct/src | |
| parent | 93694fe5219d224c92dcd5bd96a6c04f8cfa8aae (diff) | |
| download | mruby-40c18fca77175a9e2882baa1975d4460412a4d28.tar.gz mruby-40c18fca77175a9e2882baa1975d4460412a4d28.zip | |
self must be the newly created object in initialization block; close #1858
Diffstat (limited to 'mrbgems/mruby-struct/src')
| -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 34db4c40f..05fc2485d 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -382,7 +382,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass) } st = make_struct(mrb, name, rest, struct_class(mrb)); if (!mrb_nil_p(b)) { - mrb_funcall(mrb, b, "call", 1, st); + mrb_yield_internal(mrb, b, 1, &st, st, mrb_class_ptr(klass)); } return st; |
