From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#62761: ruby-add-log-current-method drops some segments when singleton definition references outer module Date: Tue, 11 Apr 2023 00:02:03 +0300 Message-ID: <9d81bdc8-355d-7d32-8d3c-361ea0ff585c@gutov.dev> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------IKyM0JzpLeG3y6wvZPwNqOS9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6701"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 To: 62761@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 10 23:03:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plyfX-0001X6-Dh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Apr 2023 23:03:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plyfJ-0002sg-Ea; Mon, 10 Apr 2023 17:03:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plyfH-0002sD-5w for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2023 17:03:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1plyfG-0007c2-Tu for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2023 17:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1plyfG-0005T1-64 for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2023 17:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Apr 2023 21:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62761 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168116053420955 (code B ref -1); Mon, 10 Apr 2023 21:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Apr 2023 21:02:14 +0000 Original-Received: from localhost ([127.0.0.1]:36045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plyeT-0005Ru-HL for submit@debbugs.gnu.org; Mon, 10 Apr 2023 17:02:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:32934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plyeQ-0005Rm-VX for submit@debbugs.gnu.org; Mon, 10 Apr 2023 17:02:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plyeQ-0002dC-Ic for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2023 17:02:10 -0400 Original-Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plyeO-0007R8-D9 for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2023 17:02:10 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id A23D1581F9A for ; Mon, 10 Apr 2023 17:02:05 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 10 Apr 2023 17:02:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1681160525; x=1681164125; bh=R19WYq46lttHdG06VOOfQ86Ey 7/i0uGHqZKLURrm/XI=; b=DYyeWdy8GBJxDE4hRLQV0MZoMwRBlndVun97A2IGv OHulaohoRKtgJ935CFPOi2MGejPUdF1EBMFs6ZANaPsjNIBiYt1pMLoacuhVhp7k Kh7KlnFTmrM9b6mHKWvPWXHKllx+p9dQHkbhgI5Ksnpd4M0KwePHid4OsGAuedwy QSrJ/b+oppYZ6FT7KoHsTYupai/lg/b6jKAZey9fcbuwMaL3TbFvbfyU6jcjPHvP gRu87KJft9/Ae/tivxl7fA65UYSgBkvM/OGmePacu61V6jJjcBjLplGwMQAmiRMc i9aN4jXAUeCeOSUYBaguPg/VEuNA3S4FYQCZCJd/XGN6g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1681160525; x=1681164125; bh=R19WYq46lttHdG06VOOfQ86Ey7/i0uGHqZK LURrm/XI=; b=ZEPglQDtkgEH1DAzuIto9Hat4jL6Zwj5j22XAadNx+3UvllDD4F ph4KN7dqEF4f5Fh0ld4erqFQgeZF3OyUmY4v/Ng6n1BRI6W3PAxCZ0kdj6yxDQLP 5Fn0f9yjyr8GVTYnhO28yLP7qMMpjCA+s31KLRbWtaMBo7ATF0y0uT3xUCqb26Ue IeraL1XJjFS92ETnmJgq2bFgDHKgn+YbQ0gJVNmlmMFMRBU0eMcOfptjRD2CHDEi yQS+Z9tyloqx0osugsUqEkYRRjZR3AtBvq4vOUOq5BxpLelueCkJD34c1AC388sq c3xORHRWtFHKACr1itPnbBo9C7RhyH7bYDw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekvddgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfvhffusehmtderre dtfeejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthho vhdruggvvheqnecuggftrfgrthhtvghrnheptddvgedvfeejtdetueeuteehveejtdffte dtjeeijeduvdegveevuefhleetgeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 10 Apr 2023 17:02:04 -0400 (EDT) Content-Language: en-US Received-SPF: pass client-ip=66.111.4.221; envelope-from=dmitry@gutov.dev; helo=new1-smtp.messagingengine.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_FMBLA_NEWDOM28=0.799, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259604 Archived-At: This is a multi-part message in MIME format. --------------IKyM0JzpLeG3y6wvZPwNqOS9 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. --------------IKyM0JzpLeG3y6wvZPwNqOS9 Content-Type: text/x-patch; charset=UTF-8; name="ruby-add-log-reference-containing.diff" Content-Disposition: attachment; filename="ruby-add-log-reference-containing.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3J1YnktbW9kZS5lbCBiL2xpc3AvcHJvZ21v ZGVzL3J1YnktbW9kZS5lbAppbmRleCBiZWNjYjgxODJhNy4uMTE5OWFmNjQ4MjEgMTAwNjQ0 Ci0tLSBhL2xpc3AvcHJvZ21vZGVzL3J1YnktbW9kZS5lbAorKysgYi9saXNwL3Byb2dtb2Rl cy9ydWJ5LW1vZGUuZWwKQEAgLTE5MTEsNyArMTkxMSw3IEBAIHJ1YnktYWRkLWxvZy1jdXJy ZW50LW1ldGhvZAogICAgICAgICAgICAgICAgICAgICAgICAgKHdoaWxlIG1sCiAgICAgICAg ICAgICAgICAgICAgICAgICAgIChpZiAoc3RyaW5nLWVxdWFsIChjYXIgbWwpIChjYXIgbW4p KQogICAgICAgICAgICAgICAgICAgICAgIC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AgICAgICAgICAgICAgICAg ICAgICAgIm1vZHVsZSBNCisgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIG1vZHVsZSBO CisgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgbW9kdWxlIEMKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgfCAgICAgIGNsYXNzIEQKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgfCAgICAgICAgZGVmIEMuZm9vCisgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAg ICAgICAgXworICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICBlbmQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgfCAgICAgIGVuZAorICAgICAgICAgICAgICAgICAgICAg ICAgICB8ICAgIGVuZAorICAgICAgICAgICAgICAgICAgICAgICAgICB8ICBlbmQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgfGVuZCIpCisgICAgKHNlYXJjaC1iYWNrd2FyZCAiXyIp CisgICAgKHNob3VsZCAoc3RyaW5nPSAocnVieS1hZGQtbG9nLWN1cnJlbnQtbWV0aG9kKSAi TTo6Tjo6Qy5mb28iKSkpKQorCiAoZXJ0LWRlZnRlc3QgcnVieS1hZGQtbG9nLWN1cnJlbnQt bWV0aG9kLWFmdGVyLWlubmVyLWNsYXNzICgpCiAgIChydWJ5LXdpdGgtdGVtcC1idWZmZXIg KHJ1YnktdGVzdC1zdHJpbmcKICAgICAgICAgICAgICAgICAgICAgICAgICAgIm1vZHVsZSBN Cg== --------------IKyM0JzpLeG3y6wvZPwNqOS9--