emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62761: closed (ruby-add-log-current-method drops some segments when


From: GNU bug Tracking System
Subject: bug#62761: closed (ruby-add-log-current-method drops some segments when singleton definition references outer module)
Date: Wed, 12 Apr 2023 21:48:01 +0000

Your message dated Thu, 13 Apr 2023 00:47:37 +0300
with message-id <2ca3dbe9-3a12-362c-df1b-f247ce728b5a@gutov.dev>
and subject line Re: bug#62761: ruby-add-log-current-method drops some segments 
when singleton definition references outer module
has caused the debbugs.gnu.org bug report #62761,
regarding ruby-add-log-current-method drops some segments when singleton 
definition references outer module
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
62761: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62761
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: ruby-add-log-current-method drops some segments when singleton definition references outer module Date: Tue, 11 Apr 2023 00:02:03 +0300 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0
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.

Attachment: ruby-add-log-reference-containing.diff
Description: Text Data


--- End Message ---
--- Begin Message --- 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 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0
Version: 29.1

On 12/04/2023 09:17, Eli Zaretskii wrote:
Date: Wed, 12 Apr 2023 03:17:55 +0300
Cc:62761@debbugs.gnu.org
From: Dmitry Gutov<dmitry@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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]