Remove trailing spaces from Ruby code and docs

Small, but important code clean up. Trailing spaces are forbidden in many code styles.