Add Ruby version guards for explicit conversion specifications