GNU bug report logs - #29107
27.0.50; Infinite recursion in Ruby mode

Previous Next

Package: emacs;

Reported by: Anders Lindgren <andlind <at> gmail.com>

Date: Wed, 1 Nov 2017 19:53:01 UTC

Severity: normal

Tags: confirmed

Found in versions 27.0.50, 24.4

Fixed in version 28.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 29107-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Anders Lindgren <andlind <at> gmail.com>, 29107-done <at> debbugs.gnu.org
Subject: Re: bug#29107: 27.0.50; Infinite recursion in Ruby mode
Date: Sat, 2 Jan 2021 04:20:49 +0200
Version: 28.1

Hi Anders,

On 01.11.2017 21:52, Anders Lindgren wrote:
> I just noticed that Ruby mode can go into infinite recursion (or "Lisp 
> nesting exceeds ‘max-lisp-eval-depth’"). I managed to boil it down to 
> the following:
> 
>      Evaluate (setq debug-on-error t)
> 
>      Open a new file, say test.rb
>      Type:
> 
>          func do {
> 
>      And press return.
> 
> In the backtrace, the following is listed over and over again:
> 
>    ruby-smie--indent-to-stmt()
>    ruby-smie-rules(:before "{")
>    smie-indent--rule-1(:before "{" nil nil)
>    smie-indent--rule(:before "{")
>    smie-indent-keyword()
>    run-hook-with-args-until-success(smie-indent-keyword)
>    smie-indent-calculate()
>    smie-indent-virtual()
> 
> It happens in Emacs 25.2 and in a week-old build from the master branch.

Sorry about the long wait, it didn't seem like a critical issue given 
that the code in question was either a typo, or a very weird way to 
write a block. Please correct me if I'm wrong here.

Either way, it should be fixed now in master, commit 0f561ee553.




This bug report was last modified 4 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.