summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c
index 80666b7f19..5a78906a2e 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -116,9 +116,9 @@ void
rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex)
{
if (func != rb_f_notimplement) {
- rb_method_cfunc_t opt = {
- func, argc,
- };
+ rb_method_cfunc_t opt;
+ opt.func = func;
+ opt.argc = argc;
rb_add_method(klass, mid, VM_METHOD_TYPE_CFUNC, &opt, noex);
}
else {