[#92891] Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1? — Al Snow <jasnow@...>
Tried the new 2.7.0-preview1 upgrade to Ruby and see that bundler is also u=
5 messages
2019/05/30
[#92892] Re: Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1?
— SHIBATA Hiroshi <hsbt@...>
2019/05/30
Bundler 2.1.0.pree.1 is the expected version.
[#92893] Re: Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1?
— Al Snow <jasnow@...>
2019/05/30
[ruby-core:92875] [Ruby trunk Feature#10344] [PATCH] Implement Fiber#raise
From:
fg@...
Date:
2019-05-28 11:26:16 UTC
List:
ruby-core #92875
Issue #10344 has been updated by decuplet (Nikita Shilnikov).
Shortly after I started to work on a library implementing algebraic effects (https://github.com/dry-rb/dry-effects) I stumbled upon lack of `Fiber#raise`. From the user POV it is important to signal improper use of effects with a meaningful stacktrace so they can quickly detect what's wrong. It's possible to emulate `#raise` with checks but it's quite inefficient and seems redundant. Thank you all folks for discussing and working on this, I hope it'll land in 2.7. If you're interested I can show a clear example but the task is almost identical to @ioquatix's one.
----------------------------------------
Feature #10344: [PATCH] Implement Fiber#raise
https://bugs.ruby-lang.org/issues/10344#change-78254
* Author: nome (Knut Franke)
* Status: Closed
* Priority: Normal
* Assignee: ioquatix (Samuel Williams)
* Target version: 2.7
----------------------------------------
While it is possible to implement this in pure Ruby (by wrapping Fiber.yield and Fiber#resume), this feels like a low-level feature that ought to be provided out of the box. Also, the C implementation is more straight-forward, and more efficient. Unfortunately, it is not quite possible to implement this as a C extension module (without resorting to wrappers again); cf. the change to make_passing_arg().
Example usage:
~~~
fib = Fiber.new do
counter = 0
loop { counter += Fiber.yield }
counter
end
fib.resume
fib.resume 10
fib.resume 100
fib.raise StopIteration # => 110
~~~
---Files--------------------------------
0001-Implement-Fiber-raise.patch (4.12 KB)
0001-Implement-Fiber-raise.patch (3.51 KB)
0001-Implement-Fiber-raise-in-ext-fiber.patch (3.6 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>