Refactor duplicate code in rb_array_replace
In both cases in the if statement, we free heap allocated arrays and unshare shared arrays.
Refactor duplicate code in rb_array_replace
In both cases in the if statement, we free heap allocated arrays and
unshare shared arrays.