]> git.eshelyaron.com Git - emacs.git/commitdiff
ruby-smie-rules: Avoid one case of infinite recursion
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 2 Jan 2021 02:18:59 +0000 (04:18 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 2 Jan 2021 02:19:09 +0000 (04:19 +0200)
* lisp/progmodes/ruby-mode.el (ruby-smie-rules):
Avoid one case of infinite recursion (bug#29107).

lisp/progmodes/ruby-mode.el

index 155a1609d3e60d9771ec8454875dced5328f3872..3effb6ed66288011208c9c49224f705f1d4a9357 100644 (file)
@@ -598,7 +598,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
     (`(:before . ,(or "(" "[" "{"))
      (cond
       ((and (equal token "{")
-            (not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";"))
+            (not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";" "do"))
             (save-excursion
               (forward-comment -1)
               (not (eq (preceding-char) ?:))))