finished swapcase in both ruby and js