Update Ruby

Merges in changes from #1001