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-Status: No, score=-2.1 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY shortcircuit=no autolearn=no 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 06C891F5AE for ; Thu, 23 Jul 2020 08:47:32 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 0FAA4120B54; Thu, 23 Jul 2020 17:47:02 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 0555E120B54 for ; Thu, 23 Jul 2020 17:46:58 +0900 (JST) Received: by filterdrecv-p3mdw1-75c584b9c6-nzp6n with SMTP id filterdrecv-p3mdw1-75c584b9c6-nzp6n-20-5F194E9E-19 2020-07-23 08:47:26.275879078 +0000 UTC m=+2302677.144455965 Received: from herokuapp.com (unknown) by ismtpd0022p1iad2.sendgrid.net (SG) with ESMTP id ymmRIkY_QLCRf9m3Eaj0Bw for ; Thu, 23 Jul 2020 08:47:26.148 +0000 (UTC) Date: Thu, 23 Jul 2020 08:47:26 +0000 (UTC) From: nagachika00@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 75085 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 16764 X-Redmine-Issue-Author: exterm X-Redmine-Sender: nagachika 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?O2wxg26uOO6cft6GjkEp=2FGevTnH9lR=2FEdG60AX3F8=2FBHB3=2FuservSFfyp8cxa3?= =?us-ascii?Q?pLqAI9ysQrOtal5mfo4uS5wf1xBX7DOPEjfXVcG?= =?us-ascii?Q?BdIwNKoXHaZYR4axRlQcRzd4cQHTHleTAl71nlQ?= =?us-ascii?Q?MHzCGbXR9rjQC1ciFBB2F0Pty3k2rKUQUQGFr33?= =?us-ascii?Q?prabgxLYAcdO6CCakPyQD+1c9rQRFOJno3EZ28B?= =?us-ascii?Q?8b4dxLA410e8ZgQZk=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 99296 Subject: [ruby-core:99296] [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 nagachika (Tomoyuki Chikanaga). Backport changed from 2.5: REQUIRED, 2.6: REQUIRED, 2.7: REQUIRED to 2.5: R= EQUIRED, 2.6: REQUIRED, 2.7: DONE ruby_2_7 c65aae118ccff86096b9983641b371491bc23434 merged revision(s) 927308= 108cced69cae478798004524b9a5d2f252. ---------------------------------------- Bug #16764: Module.const_source_location does not work on autoloaded consta= nts https://bugs.ruby-lang.org/issues/16764#change-86685 * 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: REQUIRED, 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: