Fix bug in beginning-of-defun in ruby-mode.