diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c index 9a6c5ede3f..6770162b94 100644 --- a/ext/fiddle/closure.c +++ b/ext/fiddle/closure.c @@ -295,7 +295,7 @@ initialize_body(VALUE user_data) result = ffi_prep_closure_loc(pcl, cif, callback, (void *)(data->self), cl->code); #else - result = ffi_prep_closure(pcl, cif, callback, (void *)self); + result = ffi_prep_closure(pcl, cif, callback, (void *)(data->self)); cl->code = (void *)pcl; i = mprotect(pcl, sizeof(*pcl), PROT_READ | PROT_EXEC); if (i) {