--- 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.
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 ---