From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 82C0E1F4B4 for ; Sun, 4 Apr 2021 22:42:32 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 23230120CB8; Mon, 5 Apr 2021 07:41:32 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id A388C120CB4 for ; Mon, 5 Apr 2021 07:41:29 +0900 (JST) Received: by filterdrecv-p3iad2-7d7c446bd4-mhgkr with SMTP id filterdrecv-p3iad2-7d7c446bd4-mhgkr-20-606A40D3-6 2021-04-04 22:42:27.045603009 +0000 UTC m=+1051766.793102257 Received: from herokuapp.com (unknown) by ismtpd0172p1iad2.sendgrid.net (SG) with ESMTP id lruE_YRtQG-F8QdbchbK4Q for ; Sun, 04 Apr 2021 22:42:26.970 +0000 (UTC) Date: Sun, 04 Apr 2021 22:42:27 +0000 (UTC) From: usa@garbagecollect.jp Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 79257 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 16764 X-Redmine-Issue-Author: exterm X-Redmine-Sender: usa X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?9Ij0W+xF+66shKwcOf8RvdqxJGkEJjaCZuueI4cieuA84eM8z3x7jdem9fYZHt?= =?us-ascii?Q?2zh3wcJ8YiFXkyLjO98HAp+=2FIK+8PETNUck58NL?= =?us-ascii?Q?F8F=2FwkRiopg1mO+F4dcrnsVShnjiE+OzzU9dBNO?= =?us-ascii?Q?EGQHpqYrKjfFeSYBBd5jIYtJZR+y35aZOJuy+yB?= =?us-ascii?Q?beSpk5asIh8nVLrieJDYP75J2YGsjiwRRQdtBN1?= =?us-ascii?Q?9zhjmGguCwT9Sp3+g=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 103214 Subject: [ruby-core:103214] [Ruby master Bug#16764] Module.const_source_location does not work on autoloaded constants X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #16764 has been updated by usa (Usaku NAKAMURA). Backport changed from 2.5: REQUIRED, 2.6: REQUIRED, 2.7: DONE to 2.5: REQUI= RED, 2.6: DONE, 2.7: DONE bacported into ruby_2_6 at r16764 ---------------------------------------- Bug #16764: Module.const_source_location does not work on autoloaded consta= nts https://bugs.ruby-lang.org/issues/16764#change-91289 * Author: exterm (Philip M=FCller) * Status: Closed * Priority: Normal * ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19] * Backport: 2.5: REQUIRED, 2.6: DONE, 2.7: DONE ---------------------------------------- As we found when trying out `const_source_location` on a Rails project, it = breaks when used on autoloaded constants. Example: ``` $ cat foo.rb autoload :Bar, './bar' Bar puts Module.const_source_location("Bar") ``` Returns `foo.rb:3`, when it should return `bar.rb:1`. -- = https://bugs.ruby-lang.org/ Unsubscribe: