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 1EF171F4EB for ; Wed, 19 Feb 2025 01:48:23 +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=SVjrKr7l; 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=MRh1JfhS; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1739929671; bh=1jyP04W5MW9zkyH3Q+FXnQAgwKbQEelFB+sZZJpzorY=; 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=SVjrKr7lLKVX1UDbynIvQHTY/Bpguclrx6lX6PCx7JZuJrTAs/CKlRqJ2DiA7vzM3 83d3NF08IXxZAxFOdo2Bnl9DgzQnf3fcRv8LZ5sGp8HoFPu/DW8RHrLJYCK69TySoI eBcGbQaw5tXjc/O8MzXJy/OOXPywGHPVtjOPMC2I= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 81067469D5 for ; Wed, 19 Feb 2025 01:47:51 +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=MRh1JfhS; 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 45165469C2 for ; Wed, 19 Feb 2025 01:47:46 +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=RueM+a82+WO4af2Ry2DiLBtE4yfSi3Qj2aMNGgBI6gE=; b=MRh1JfhSB86zN+QF41+AeOZWHbYVZdTRw/FfoTt08kWA8cWvBPVIShtfInBTDBI8P/nf rudmheBMEjSPw9Vc9AbG+funGBLT7TAF7XC2SWtx2lG9fbbtlxlPsGBCQ3f9j9EuAEdD/j hH6z6T3HxJeX0JM+/Cya8PhA/q/aMUXRH0OYAyjp/RUHdKDR8LCjjuKAyj3uCi2L7We7vu 8Eq8jYp4ycVGSxlycJvrgqDPnRutxZzVOAYUxsaTLRVm9DifA+oje/J/xURujmoD+k5ZtE 1VqFB6zaxkjFbo6XzJ5BXWqJDRQz5hqvcVCyuyCAn5rjosvic7gIdLcE3gd28w4w== Received: by recvd-84b546689d-94c5v with SMTP id recvd-84b546689d-94c5v-1-67B53840-5 2025-02-19 01:47:44.312299046 +0000 UTC m=+8310376.454440097 Received: from herokuapp.com (unknown) by geopod-ismtpd-15 (SG) with ESMTP id 5bUjmhAoQaK-O4LagJ9EzA for ; Wed, 19 Feb 2025 01:47:44.221 +0000 (UTC) Date: Wed, 19 Feb 2025 01:47:44 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Misc X-Redmine-Issue-Id: 20968 X-Redmine-Issue-Author: koic X-Redmine-Issue-Priority: Normal X-Redmine-Sender: jeremyevans0 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: 97841 X-SG-EID: =?us-ascii?Q?u001=2ELyyp8a6L4BPdoBZ5kcNQuEdalXgUnCKLcPykf2c9d2sTWfvALBzqM4Ij+?= =?us-ascii?Q?Jg9Prp2eVDkf9lIZhzc05KfUT4Npfgnigb95d+v?= =?us-ascii?Q?hGuAMoCQYcJ+IA0W7w7NCN0kt6qNwBSXA+nM8Qa?= =?us-ascii?Q?yFrxadWg1N+GR1BGmaaPGZvTNU9yAx6S4ZHbIWR?= =?us-ascii?Q?BaewVIqiFDv8LjkRI=2FT50P1VO0MoolpbzfZtzEl?= =?us-ascii?Q?OleoYOlPwDo3cDcF7rcchb271VvbDE+9krLo5tZ?= =?us-ascii?Q?IsqYMRu4epfEEOdngb3QoPx3iw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: DW6XDSTPF75SZITXTFOTHK5D63D4WT43 X-Message-ID-Hash: DW6XDSTPF75SZITXTFOTHK5D63D4WT43 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:121119] [Ruby master Misc#20968] `Array#fetch_values` unexpected method name in stack trace List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "jeremyevans0 (Jeremy Evans) via ruby-core" Cc: "jeremyevans0 (Jeremy Evans)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20968 has been updated by jeremyevans0 (Jeremy Evans). My thinking is inline with @Eregon 's. It's significantly more work to try to modify the backtraces to omit `' ``` Note that I never overrode `initialize`. I am calling `new`, but `initialize` is showing up in the backtrace even though both `new` and `initialize` are defined in C. The internal reason for this is because `Class.new` uses `rb_funcallv_kw` to call `Obejct#initialize`, which pushes a VM frame. That being said, if we do want to change behavior of this only for `' $ ruby -e '[1].fetch_values(42)' -e:1:in 'Array#fetch_values': index 42 outside of array bounds: -1...1 (IndexError) from -e:1:in '
' ``` ## Actual The stack trace displays the `Array#fetch` method, which user is not aware of, along with the `` stack trace. ```console $ ruby -e '[1].fetch_values(42)' :211:in 'Array#fetch': index 42 outside of array bounds: -1...1 (IndexError) from :211:in 'block in Array#fetch_values' from :211:in 'Array#map!' from :211:in 'Array#fetch_values' from -e:1:in '
' ``` It likely requires an approach such as implementing it in C, as suggested in https://github.com/ruby/ruby/pull/11555. -- 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/