⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (232 Bytes)
Bug #17814
» test.rb
dzwdz (Kuba Prawdziwe-Nazwisko)
, 04/19/2021 03:00 PM
#!/usr/bin/env ruby
i
=
0
f
=
Fiber
.
new
do
loop
do
p
i
Fiber
.
yield
i
i
+=
1
end
end
e
=
Enumerator
.
produce
{
f
.
resume
}
p
[
0
,
0
,
0
,
0
].
zip
e
p
[
0
,
0
,
0
,
0
].
zip
e
p
[
0
,
0
,
0
,
0
].
each
.
zip
e
p
[
0
,
0
,
0
,
0
].
each
.
zip
e
« Previous
1
2
Next »
(1-1/2)
Loading...