From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 47D061F4CC for ; Thu, 9 Jan 2025 14:33:55 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=XFshpj9Y; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=Hpj/e6Aq; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1736433202; bh=Q1Fht+YSW77MxjBBXEYt4e/J6KbrXKCmWFDoaG+plHQ=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=XFshpj9YhY3gX3kFtD4l+5hVoHqbuuFwFHH3Bea/pxzT0hQauvjAzb112jYeded5w Wqn/tCYU5nNCQMCNLAwwdyGqfYjens75+JSzxiGUOqXe0zBEvUqACK/Ap5Ez2OcinG gvUmVtLUTC0qO2wnonXRgwL8ZRVeAg4nsXouFlwY= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id D0A6246800 for ; Thu, 9 Jan 2025 14:33:22 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=Hpj/e6Aq; dkim-atps=neutral Received: from s.wrqvtzvf.outbound-mail.sendgrid.net (s.wrqvtzvf.outbound-mail.sendgrid.net [149.72.126.143]) by nue.mailmanlists.eu (Postfix) with ESMTPS id CB660467E6 for ; Thu, 9 Jan 2025 14:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=hHrpQS8r3JogzWYSDD1wlsB8uAsY557ZQARmu3w5hLM=; b=Hpj/e6Aq+oRzrUQg9Ngd1QTVWnbttOtGYFBd0arBJ0L7ewRNMV6Wk8+kz0wCL5yyaVpc Aw7VR44CvAoIpArA5eIsi9JAVrh07LNEEljv9P/IKTR2hBdqpF+NglPd6kMMjPcgJBkcrR XQMkvewICWeBnBanc2gQSfn/PtO+OHmLzdCnSgb4TkW9wYPq7X/+OtRitRu7trK1VqwDWn 42TbK8bnZxk+n2mOXVNG9lxXlx8x1gfGY5TCV4b2mCc9F8kwYh1c3lPNMbzMqVF848wPY6 jI6Eswf+4K3HDQzA0B28fOxUfWFJmp5ER4YdHm8L79UtEyoNqn4TfIyV7kP+KuiA== Received: by recvd-5f54b5d587-6xg6k with SMTP id recvd-5f54b5d587-6xg6k-1-677FDE2B-17 2025-01-09 14:33:15.328171771 +0000 UTC m=+4813851.766876206 Received: from herokuapp.com (unknown) by geopod-ismtpd-20 (SG) with ESMTP id qPNaGRJZTL6i8I3x6DjE6g for ; Thu, 09 Jan 2025 14:33:15.254 +0000 (UTC) Date: Thu, 09 Jan 2025 14:33:15 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 8751 X-Redmine-Issue-Author: tenderlovemaking X-Redmine-Issue-Priority: Normal X-Redmine-Sender: Eregon 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-Redmine-MailingListIntegration-Message-Ids: 97261 X-SG-EID: =?us-ascii?Q?u001=2EByjZWvxTCjdoV8K03xEuhE7KqN4thWULFLM7+oH78KY30oYB3qFthsDpL?= =?us-ascii?Q?4w4cbYa3ttBh8bAHPOnE=2FkzPba67JNu7Lnrked2?= =?us-ascii?Q?O7K9VQ=2FJax3h0Kkws08iL7zu5td4b8GF9IaYUOV?= =?us-ascii?Q?Ej7PoQhHwpeoCGEaariK3=2F5X9DxokGGicwSSn49?= =?us-ascii?Q?n4DVMBm6WCv8D4hafULqyRMSRf1=2FQhxDiJAFw9I?= =?us-ascii?Q?BaFfgR4RxFzKKMvaEjU0X6dtBIBIrV+cMeL0nrH?= =?us-ascii?Q?JDyigc8W4gfGcEcCpdoPkwwS+A=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: MH4WMID574GJUEDD3CEIQRP54OHLJ3HU X-Message-ID-Hash: MH4WMID574GJUEDD3CEIQRP54OHLJ3HU X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:120577] [Ruby master Feature#8751] Add offsets to method#source_location List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "Eregon (Benoit Daloze) via ruby-core" Cc: "Eregon (Benoit Daloze)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #8751 has been updated by Eregon (Benoit Daloze). In light of end line and column information being added in #6012 do you think there is still a need for byte offsets? ---------------------------------------- Feature #8751: Add offsets to method#source_location https://bugs.ruby-lang.org/issues/8751#change-111404 * Author: tenderlovemaking (Aaron Patterson) * Status: Open ---------------------------------------- Hello, I would like to have byte offsets returned on the source_location for methods. For example: def foo(&b) b.source_location # => [file_name, line_number, start_byte, end_byte] end If we had the start and end byte for a method or proc, then we could find the source for methods and procs in each file. There are some cases (like with heredocuments) where the "end of the method" could be after the `end` keyword. But I think if we just have offsets for the start of `def` and the end of `end`, I think it would cover 99% of usecases. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/