From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id D1A771F4B4 for ; Sat, 19 Dec 2020 11:22:44 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 0CE92120BA4; Sat, 19 Dec 2020 20:21:57 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 779F5120B4F for ; Sat, 19 Dec 2020 20:21:55 +0900 (JST) Received: by filterdrecv-p3iad2-74bd9fb996-6xc4h with SMTP id filterdrecv-p3iad2-74bd9fb996-6xc4h-18-5FDDE27E-15 2020-12-19 11:22:38.476121736 +0000 UTC m=+735624.390274547 Received: from herokuapp.com (unknown) by ismtpd0118p1mdw1.sendgrid.net (SG) with ESMTP id tgCtgfgYQI-3LjaS8Mh9Bw for ; Sat, 19 Dec 2020 11:22:38.372 +0000 (UTC) Date: Sat, 19 Dec 2020 11:22:38 +0000 (UTC) From: eregontp@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 77409 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Misc X-Redmine-Issue-Id: 17407 X-Redmine-Issue-Author: zverok 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-SG-EID: =?us-ascii?Q?KippOI8ZHtTweq7XfQzW93937kJ4QNWwSBuHnaMEcr25G6ghIHn+VhVbaUJTpi?= =?us-ascii?Q?63O5bwFkryNNC+y7QnbbqpisE9ew0=2F4NYWSSapX?= =?us-ascii?Q?2VxN1REyN9QpT4D6MxFZuCxaiKgeVeaA7w3uegO?= =?us-ascii?Q?j1XJ2IG3yqkNrQRmG99Q5Z8G51Cp8MHVtWYCtD4?= =?us-ascii?Q?Ew78OEsmOcel+fw7J5uI8GpsAsPGWQVreI2=2F9GA?= =?us-ascii?Q?eiwOJa9a66ZDGE++s=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 101537 Subject: [ruby-core:101537] [Ruby master Misc#17407] Fiber.current and require 'fiber' X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17407 has been updated by Eregon (Benoit Daloze). Maybe we should just include these Fiber methods in core, and `require 'fiber'` would be a no-op (for compatibility)? Agreed it's confusing such a core class has only half the documented defined without an extra `require`. ---------------------------------------- Misc #17407: Fiber.current and require 'fiber' https://bugs.ruby-lang.org/issues/17407#change-89319 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal ---------------------------------------- Maybe it is not the right time to ask, but why one need to do `require 'fiber'` before using `Fiber.current`? For what I can see, * it is this way since [their introduction](https://docs.ruby-lang.org/en/2.0.0/Fiber.html#method-c-current), * the actual code is defined in the core [cont.c](https://github.com/ruby/ruby/blob/master/cont.c#L2480) * the `ext/fiber.c` [does very little](https://github.com/ruby/ruby/blob/master/ext/fiber/fiber.c) I was just bitten by it again preparing the changelog (stuck with `NoMethodError` and for a few minutes thought the build is broken), is there a reason to have it this way?.. Just clarifying for docs sake, at least. -- https://bugs.ruby-lang.org/