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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 7D02F1F5CB for ; Fri, 27 Sep 2024 15:06:24 +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=AvVlgGXz; 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=T65doSgj; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1727449582; bh=4CYgP+BQx49qEAMd9ue90CWo07Us9th/QNBEATi+uwY=; 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=AvVlgGXzKCD4ALuIOZ00rufUJs+cPlp6g05BC0wJjxbsoLdw8Ev8vS36cib8PdIfh 7oUP1slQDmqCCYvyKcEjNmwRznjvTPhBqu8tbOnfksu63XqbaSDsZyRGSmb8tDcTkS YQPn+QNJjLrVvinHiHiAS6TE3T+7vWIGDhcPDgcY= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 1491F43FEE for ; Fri, 27 Sep 2024 15:06: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=T65doSgj; dkim-atps=neutral Received: from s.wfbtzhsv.outbound-mail.sendgrid.net (s.wfbtzhsv.outbound-mail.sendgrid.net [159.183.224.104]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 7F1C543E8B for ; Fri, 27 Sep 2024 15:06:09 +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=LjXDXgbJ3dlLITGfuXSX1hyqexYhppftuVT8n83HbCg=; b=T65doSgjW5UpJw0kn01kIudnYvKcvCSdJNd4hpiPG3i5vIXxOYTC2JbbkfOi0kQ94XiL HvnJCoQjbypv1OOQa3J/Vq8HVFN/uLnVQbvffud/PlkyHURF2QkyOvmmhWgef3OGW8aoyo mzuY7/1tnp3lCG7rRy+/h4iQp2Dd+1MULLyFh6Hm1fmrEoMDOID2ptQeMFb7FrCe5l4h4o 5gzebcATlCX++S3nat/JH6jJFcASKmxx4CpyK0fE0cmVxARYnvUBDLW1bZF4EvDIHjO96M dsL1ytZG2nPb7IW8jv/mNFX7FR0y4H7DbaKXXj5dwc54aCn5BoO1L519NGsy650g== Received: by recvd-d66cff667-zgwg2 with SMTP id recvd-d66cff667-zgwg2-1-66F6C9E0-F 2024-09-27 15:06:08.123164056 +0000 UTC m=+1285799.891001552 Received: from herokuapp.com (unknown) by geopod-ismtpd-25 (SG) with ESMTP id QJAyDRiAR_muM2bQrksN6w for ; Fri, 27 Sep 2024 15:06:08.023 +0000 (UTC) Date: Fri, 27 Sep 2024 15:06:08 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 6012 X-Redmine-Issue-Author: rogerdpack X-Redmine-Issue-Assignee: nobu 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: 95955 X-SG-EID: =?us-ascii?Q?u001=2EByjZWvxTCjdoV8K03xEuhE7KqN4thWULFLM7+oH78KY30oYB3qFthsDpL?= =?us-ascii?Q?4w4cbYa3ttBh8bAHPOnE=2FkzPba67JNu7Lnrked2?= =?us-ascii?Q?O7K9VQ=2FJax2EV6DG2iWXX1ri0P62eHKHVRRO7i8?= =?us-ascii?Q?5kmZvnAlTY+vlgxLv6BY38mmBeh=2FzK86LnAjhvI?= =?us-ascii?Q?Td2EShy9AKpopyHLzFE21weJid+U4bIBjYi10F9?= =?us-ascii?Q?UruULhmxLkcDI6RuCZiwoXppLdLZdPgTCM7DczD?= =?us-ascii?Q?Dz+AZw3Ok0oEkPCGbkeJIvs9AA=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: CPKVT7DQYJGYIJSSDN4QF7W7IVCTXRKH X-Message-ID-Hash: CPKVT7DQYJGYIJSSDN4QF7W7IVCTXRKH 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:119320] [Ruby master Feature#6012] Proc#source_location also return the column 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 #6012 has been updated by Eregon (Benoit Daloze). It seems good to revisit this, the workarounds are pretty messy and CRuby-specific, e.g. https://github.com/rails/rails/pull/53055/files I think @mame 's suggestion in https://bugs.ruby-lang.org/issues/6012#note-12 is fine although I think it would be convenient to also expose the byte offsets (start and end): `.source_location #=> [path, start_line, start_column, start_offset, end_line, end_column, end_offset]` Then it would be really easy to "get the source code of a Proc". And of course we should do the same for Method/UnboundMethod (#8751). ---------------------------------------- Feature #6012: Proc#source_location also return the column https://bugs.ruby-lang.org/issues/6012#change-109934 * Author: rogerdpack (Roger Pack) * Status: Assigned * Assignee: nobu (Nobuyoshi Nakada) ---------------------------------------- As originally suggested in http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/42418 Suggestion/feature request: have #source_location also return the beginning column where it was defined. ["test.rb", 8, 33] Thanks! -roger- -- 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/