fix simple trailing whitespace

fixes #742

https://bugs.ruby-lang.org/issues/7175

@bf4 @jeremy 
Generally speaking, reorganizing code in a PR makes it hard to see what really changed. The simplification is welcome, but is a better fit for a separate PR.