Fix ruby -w warnings.

This removes ruby warnings that are emitted when running with `RUBYOPT=-w`.