Using RB_GC_GUARD to avoid overwritten VALUE pointer by optimization