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 D8FA01F5CB for ; Thu, 3 Oct 2024 06:53:59 +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=DZKF9INL; 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=RE9jTYQJ; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1727938437; bh=fzF+rxp18cP5LcrgK7ZA7T6eJ4iSzGbDYjFDRH3XeD4=; 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=DZKF9INLp9FTl0NIoMQ5FjFVRqxl1tE74dEIRpnCk3GF+eLIxY/Qt+yDqGjeX7cDw wgDVYGZnt7h/HOJKcsIJ+6aX8wWQe3P3KnZRK2TvpXXyQnjCIsoGoOuSE0WNGLI7hV lecnPtKHT1BFf/xixu0oqy1vVtNkLaH/MUOmyChg= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 0F60343F65 for ; Thu, 3 Oct 2024 06:53:57 +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=RE9jTYQJ; 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 E259E43CFB for ; Thu, 3 Oct 2024 06:53: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=UrSYomZESmrvKGX6rRfxc7sHB2a6eLxHz92QPktvOso=; b=RE9jTYQJRsMqoRYrCaBbOM4xB/npQ5sBafG+KlDiOrKNnsI7VgX6wwgMVuYLVcKLa2Cr Ckw+2zOqu6UfUvMfVSn1ZtoYW1Nb6ErBUMlkLJ3utgaMXp3Cx29m0HJzjHXUDbwwHsRrVr U1TyfOFml1ongyd2YD69de5bUTxUKjGPV8k+vEH8nyUyD59m6nQz/IgiYwT+v8rHS7+AVo DP/U/gYELzUXi/fFEWPBniTKi8PI19rJV5DgXRFPuI2rOe1ZxCaBqA0mHjHw5Re3GMTwzQ YCQLXz9ORLf5OC7HBLSgo7pAL57WG/GdfThlJ3niKA2v22313KhNm0UtE/Vzvv/g== Received: by recvd-55fc7fd858-h6r4k with SMTP id recvd-55fc7fd858-h6r4k-1-66FE3F79-10 2024-10-03 06:53:45.491940423 +0000 UTC m=+1774593.485038537 Received: from herokuapp.com (unknown) by geopod-ismtpd-5 (SG) with ESMTP id uq5rl8cHQseShzsuXKHjzw for ; Thu, 03 Oct 2024 06:53:45.404 +0000 (UTC) Date: Thu, 03 Oct 2024 06:53:45 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20620 X-Redmine-Issue-Author: dentarg X-Redmine-Issue-Priority: Normal X-Redmine-Sender: matz 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: 96057 X-SG-EID: =?us-ascii?Q?u001=2Eqca74XLbbBG2T0HhbEZgBN9E1Qhb0c7bGBe1waNAWdTreSqyWPDekZUgq?= =?us-ascii?Q?NYk4+nm=2F0VIqwc8ZBTQxqk7G=2FctsRLtYG2yTl=2FP?= =?us-ascii?Q?2CaGNETxG2Q5HR0WksYzIwiriLEpPrqQY=2FeC06g?= =?us-ascii?Q?5XteJ2jCyd8n2B3AQtFb4mgVvvqXURiMsaS58sj?= =?us-ascii?Q?3p8fjBj7jI76HR0XLOb81qBos8dac8HDsSDgHLd?= =?us-ascii?Q?Ux2JbN4fop6+Jj1uxqAAl7m2oDFmdpNb5zxir2g?= =?us-ascii?Q?xEw6aKYFgnvjfB8oTjEXaQP5hA=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 3HLXOOITELANQFZSSSXJPBUXVCZWAWVI X-Message-ID-Hash: 3HLXOOITELANQFZSSSXJPBUXVCZWAWVI 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:119421] [Ruby master Bug#20620] singleton_method undefined for module using "extend self" List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "matz (Yukihiro Matsumoto) via ruby-core" Cc: "matz (Yukihiro Matsumoto)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20620 has been updated by matz (Yukihiro Matsumoto). @jeremyevans0 Thank you. Let us merge the pull-request, and experiment with the preview. Matz. ---------------------------------------- Bug #20620: singleton_method undefined for module using "extend self" https://bugs.ruby-lang.org/issues/20620#change-110035 * Author: dentarg (Patrik Ragnarsson) * Status: Open * ruby -v: ruby 3.4.0dev (2024-07-08T21:43:28Z master e500222de1) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Is this a bug? I expected `ExtendSelf.singleton_method(:foo)` to work when `ExtendSelf.singleton_methods` worked and `:foo` was in the list returned. ```ruby # singleton_method.rb class Klass def self.foo end end module ExtendSelf extend self def foo end end p RUBY_DESCRIPTION p "Klass" p Klass.singleton_methods # => [:foo] p Klass.singleton_method(:foo) # => # p "ExtendSelf" p ExtendSelf.singleton_methods # => [:foo] p ExtendSelf.singleton_method(:foo) # => singleton_method.rb:19:in `singleton_method': undefined singleton method `foo' for `ExtendSelf' (NameError) ``` ```shell $ docker run --rm -it -v $(pwd):/app -w /app rubylang/ruby:master-nightly-jammy Unable to find image 'rubylang/ruby:master-nightly-jammy' locally master-nightly-jammy: Pulling from rubylang/ruby ... Digest: sha256:922037b184b897786a26b2460f70a66139f87dce67f20ddf760cd4186790ed9f root@9807305c322a:/app# ruby -v ruby 3.4.0dev (2024-07-08T21:43:28Z master e500222de1) [x86_64-linux] root@9807305c322a:/app# ruby singleton_method.rb "ruby 3.4.0dev (2024-07-08T21:43:28Z master e500222de1) [x86_64-linux]" "Klass" [:foo] # "ExtendSelf" [:foo] singleton_method.rb:21:in 'Kernel#singleton_method': undefined singleton method 'foo' for 'ExtendSelf' (NameError) ``` -- 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/