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


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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 1 (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 94 days ago.

Previous Next


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