Consume the argument to RB_GC_GUARD to avoid a useless evaluation

Eliminates compiler warnings such as:
```
warning: expression result unused
      [-Wunused-value]
    RB_GC_GUARD(ptr);
                ^~~~~~~
```