Refactor ruby-mode.