ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: zverok.offline@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:101529] [Ruby master Misc#17407] Fiber.current and require 'fiber'
Date: Fri, 18 Dec 2020 23:08:44 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-17407.20201218230843.710@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-17407.20201218230843.710@ruby-lang.org

Issue #17407 has been reported by zverok (Victor Shepelev).

----------------------------------------
Misc #17407: Fiber.current and require 'fiber'
https://bugs.ruby-lang.org/issues/17407

* 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/

       reply	other threads:[~2020-12-18 23:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 23:08 zverok.offline [this message]
2020-12-19 11:22 ` [ruby-core:101537] [Ruby master Misc#17407] Fiber.current and require 'fiber' eregontp
2021-01-04  1:47 ` [ruby-core:101898] [Ruby master Feature#17407] " nobu
2021-01-13  6:52 ` [ruby-core:102053] " ko1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-17407.20201218230843.710@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).