GNU bug report logs - #62761
ruby-add-log-current-method drops some segments when singleton definition references outer module

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Mon, 10 Apr 2023 21:03:02 UTC

Severity: normal

Fixed in version 29.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dmitry Gutov <dmitry <at> gutov.dev>
Subject: bug#62761: closed (Re: bug#62761: ruby-add-log-current-method
 drops some segments when singleton definition references outer module)
Date: Wed, 12 Apr 2023 21:48:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#62761: ruby-add-log-current-method drops some segments when singleton definition references outer module

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 62761 <at> debbugs.gnu.org.

-- 
62761: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62761
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 62761-done <at> debbugs.gnu.org
Subject: Re: bug#62761: ruby-add-log-current-method drops some segments when
 singleton definition references outer module
Date: Thu, 13 Apr 2023 00:47:37 +0300
Version: 29.1

On 12/04/2023 09:17, Eli Zaretskii wrote:
>> Date: Wed, 12 Apr 2023 03:17:55 +0300
>> Cc:62761 <at> debbugs.gnu.org
>> From: Dmitry Gutov<dmitry <at> gutov.dev>
>>
>> Here's a slight modification of the patch which leaves just one
>> (optional) 'nreverse' call, which acts on a fully temporary structure,
>> and thus is unable to alter the values held inside mlist unless really
>> intended. It keeps the behavior the same in the previous cases and
>> slightly improves the one above (the "undecidable" one):
> LGTM, thanks.

Installed, marking as done.

[Message part 3 (message/rfc822, inline)]
From: Dmitry Gutov <dmitry <at> gutov.dev>
To: bug-gnu-emacs <at> gnu.org
Subject: ruby-add-log-current-method drops some segments when singleton
 definition references outer module
Date: Tue, 11 Apr 2023 00:02:03 +0300
[Message part 4 (text/plain, inline)]
Example:

  module M
    module N
      module C
        class D
          def C.foo
            _
          end
        end
      end
    end
  end

(ruby-add-log-current-method) currently returns "M::C.foo"

While it should return "M::N::C.foo". Patch attached.

This discovery stems from Mattias EngdegÄrd's report (in private) about 
an ignored return value from `nreverse`.

Is this good for emacs-29?

It seems pretty safe (with decent test coverage, including the new 
test), but probably low urgency. Not a regression either.
[ruby-add-log-reference-containing.diff (text/x-patch, attachment)]

This bug report was last modified 2 years and 95 days ago.

Previous Next


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