diff options
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index cd9d087856c..a8667acb9d5 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1603,9 +1603,9 @@ See `add-log-current-defun-function'." "\\(" ;; \\. and :: for class methods "\\([A-Za-z_]" ruby-symbol-re "*[?!]?" - (when method-name? "\\|") - (when method-name? ruby-operator-re) - "\\|\\.\\|::" "\\)" + "\\|" + (if method-name? ruby-operator-re "\\.") + "\\|::" "\\)" "+\\)"))) (definition-re (funcall make-definition-re ruby-defun-beg-re t)) (module-re (funcall make-definition-re "\\(class\\|module\\)"))) |