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 [IPv6:2a01:4f8:1c0c:6b10::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 03E711F44D for ; Thu, 25 Apr 2024 17:35:32 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=r+MCaI0p; 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=LMfv9bIm; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 4EA97844FF; Thu, 25 Apr 2024 17:35:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1714066525; bh=rwbF3jFVKjUdpLVwdKJKGzlex2UUuIHmIofnDE6ps+I=; 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=r+MCaI0pZJ4IjkeDlKrWw40xZ+ajyAM28bOyZ94uL2gRWL+yewvbuyTnGahZW+tZK zbjLSgBJKoXHUyLSkII6XtUDZkPOX+ZenMckcufO0X5eaM+qpvRxgkoLcX2QjaALuy jm9oGNMqf2yyYTP0StdJZJ/9punehfEXy9JghhMk= 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 E120A844ED for ; Thu, 25 Apr 2024 17:35:21 +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=LMfv9bIm; dkim-atps=neutral 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=sUnN3QhPe5KR+Ql2lINs9yQmMPQTADJ+OJyx7bX8yi0=; b=LMfv9bImsdHBAUaDgz0e2UDNzoV0ScGOe9DhnCw08k6Ls4cywIpc9bPPR4xGuzLJCZgj LMpfQr26rdWt5s92jpkwjjeRxIYhSs5CifGta1wvxA1+PdG4fFhVpDJwXK+PB3fOahK+7T q+cb6uqkm+/BPe0FYHW+OLlG4A3TD4fcHp+Yur80PI5qQqh39JlENyjZcch/WDJNDRmgGb mj0ZFa7rJ9u5McVv4xGbnBe02Rg5UksA9z7aABjzDGuXKcoeN7zLhnP9Owj7dOnd8SKHJY XQrGRnz/086GJA+8ix5XzPthUfy5c7G0OKoxo4H9HH8AXhLcaO+w2T+FUKAFKPUQ== Received: by recvd-bb7996b79-56n2b with SMTP id recvd-bb7996b79-56n2b-1-662A9458-22 2024-04-25 17:35:20.892926867 +0000 UTC m=+1107240.414454352 Received: from herokuapp.com (unknown) by geopod-ismtpd-31 (SG) with ESMTP id sWkEJHCjRIyF0dUYFnkFqw for ; Thu, 25 Apr 2024 17:35:20.855 +0000 (UTC) Date: Thu, 25 Apr 2024 17:35:20 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20455 X-Redmine-Issue-Author: Eregon 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: 94306 X-SG-EID: =?us-ascii?Q?u001=2EByjZWvxTCjdoV8K03xEuhE7KqN4thWULFLM7+oH78KY30oYB3qFthsDpL?= =?us-ascii?Q?4w4cbYa3ttBh8bAHPOnE=2FkzPba67JNu7Lnrked2?= =?us-ascii?Q?O7K9VQ=2FJax1P0qC7nDEzqbzFVtpjlXvNRsn0F2j?= =?us-ascii?Q?d5NBHVg2iuD2hkzv9LI7fcdhKAJPgSjtBZYISul?= =?us-ascii?Q?+4dPf+v9CheLQ3+hchdJvIPlMOiJ15TYflIil+9?= =?us-ascii?Q?BIMNS2zTCcu9zvj+PTXFaNqtC6+hBJOFv3OrNLP?= =?us-ascii?Q?rxAiNbBO6ydwt7lqMlS15uGCjg=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: OI3ZIP3G6QRB6V5VF3OURCC2P662BWVE X-Message-ID-Hash: OI3ZIP3G6QRB6V5VF3OURCC2P662BWVE 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.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117710] [Ruby master Bug#20455] rb_errinfo() inconsistent with $! in the caller Ruby code 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 #20455 has been reported by Eregon (Benoit Daloze). ---------------------------------------- Bug #20455: rb_errinfo() inconsistent with $! in the caller Ruby code https://bugs.ruby-lang.org/issues/20455 * Author: Eregon (Benoit Daloze) * Status: Open * ruby -v: ruby 3.4.0dev (2024-04-25T08:12:47Z master 64bd8e41df) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- This (slightly modified for clarity) test in ruby/spec demonstrates the unexpected result: ```ruby describe "rb_errinfo" do def err $! end it "is cleared when entering a C method" do begin raise StandardError rescue $!.class.should == StandardError err.class.should == StandardError @s.rb_errinfo().should == nil end end ``` Why does `rb_errinfo()` return nil there, when $! is set in the caller (and $! isn't per frame but per thread, as shown with `err`)? Is this bug? If not, what is the logic and reason for clearing `$!` when calling a method defined in C? -- 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/postorius/lists/ruby-core.ml.ruby-lang.org/