Merge pull request #2303 from ksss/module-initialize

Module#initialize set created object for block argument
This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-05-22 14:10:11 +09:00
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -897,7 +897,7 @@ mrb_mod_initialize(mrb_state *mrb, mrb_value mod)
mrb_get_args(mrb, "&", &b);
if (!mrb_nil_p(b)) {
mrb_yield_with_class(mrb, b, 0, 0, mod, mrb_class_ptr(mod));
mrb_yield_with_class(mrb, b, 1, &mod, mod, mrb_class_ptr(mod));
}
return mod;
}