diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-19 07:54:22 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-19 07:54:22 +0900 |
| commit | 2f4eed25017903ab525e881107817024d36e3c66 (patch) | |
| tree | 1a72a6a265f5a54be0b3f5bb257b201a848b4e01 /mrbgems/mruby-struct/src/struct.c | |
| parent | 792c1add0cc44a60ecad661b86fd16bf773a5d58 (diff) | |
| parent | 40c18fca77175a9e2882baa1975d4460412a4d28 (diff) | |
| download | mruby-2f4eed25017903ab525e881107817024d36e3c66.tar.gz mruby-2f4eed25017903ab525e881107817024d36e3c66.zip | |
Merge pull request #1889 from iij/pr-struct-new-block-def
Set the newly created Struct object to self in its initialization block.
Diffstat (limited to 'mrbgems/mruby-struct/src/struct.c')
| -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; |
