Don't hardcode Ruby connection to IPv4

This fixes #393, thanks to @MarkMartinec.

Submitting this as a PR to make sure CI passes before merging to master.