fix removing trailing whitespace for ruby files