Upgrade Ruby to v2.1.2

@Cesy's changes from #431, plus a one-character fix to unbreak Travis.