<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/etc, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/etc] Prefer dedicated assertions</title>
<updated>2025-07-08T10:00:21+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-07-08T09:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=100c04307f2e5e0aaecd586b9defa576dd87fc13'/>
<id>100c04307f2e5e0aaecd586b9defa576dd87fc13</id>
<content type='text'>
https://github.com/ruby/etc/commit/9caddede76
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/etc/commit/9caddede76
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/etc] Removed workaround for assert_ractor</title>
<updated>2025-06-04T05:03:18+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-06-04T04:53:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=50400f3bb27070c028d9c4b3bde8efe44eba6efd'/>
<id>50400f3bb27070c028d9c4b3bde8efe44eba6efd</id>
<content type='text'>
https://github.com/ruby/etc/commit/fd61177b71
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/etc/commit/fd61177b71
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/etc] Alias value or join to take in old Ruby</title>
<updated>2025-06-03T06:59:51+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-06-03T06:57:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=17401792fad0ac9a22067092cde9e4bfb1b0f0c7'/>
<id>17401792fad0ac9a22067092cde9e4bfb1b0f0c7</id>
<content type='text'>
https://github.com/ruby/etc/commit/3dbe760bed
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/etc/commit/3dbe760bed
</pre>
</div>
</content>
</entry>
<entry>
<title>`Ractor::Port`</title>
<updated>2025-05-30T19:01:33+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2025-05-26T18:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ef2bb61018cd9ccb5b61a3d91911e04a773da4a7'/>
<id>ef2bb61018cd9ccb5b61a3d91911e04a773da4a7</id>
<content type='text'>
* Added `Ractor::Port`
  * `Ractor::Port#receive` (support multi-threads)
  * `Rcator::Port#close`
  * `Ractor::Port#closed?`
* Added some methods
  * `Ractor#join`
  * `Ractor#value`
  * `Ractor#monitor`
  * `Ractor#unmonitor`
* Removed some methods
  * `Ractor#take`
  * `Ractor.yield`
* Change the spec
  * `Racotr.select`

You can wait for multiple sequences of messages with `Ractor::Port`.

```ruby
ports = 3.times.map{ Ractor::Port.new }
ports.map.with_index do |port, ri|
  Ractor.new port,ri do |port, ri|
    3.times{|i| port &lt;&lt; "r#{ri}-#{i}"}
  end
end

p ports.each{|port| pp 3.times.map{port.receive}}

```

In this example, we use 3 ports, and 3 Ractors send messages to them respectively.
We can receive a series of messages from each port.

You can use `Ractor#value` to get the last value of a Ractor's block:

```ruby
result = Ractor.new do
  heavy_task()
end.value
```

You can wait for the termination of a Ractor with `Ractor#join` like this:

```ruby
Ractor.new do
  some_task()
end.join
```

`#value` and `#join` are similar to `Thread#value` and `Thread#join`.

To implement `#join`, `Ractor#monitor` (and `Ractor#unmonitor`) is introduced.

This commit changes `Ractor.select()` method.
It now only accepts ports or Ractors, and returns when a port receives a message or a Ractor terminates.

We removes `Ractor.yield` and `Ractor#take` because:
* `Ractor::Port` supports most of similar use cases in a simpler manner.
* Removing them significantly simplifies the code.

We also change the internal thread scheduler code (thread_pthread.c):
* During barrier synchronization, we keep the `ractor_sched` lock to avoid deadlocks.
  This lock is released by `rb_ractor_sched_barrier_end()`
  which is called at the end of operations that require the barrier.
* fix potential deadlock issues by checking interrupts just before setting UBF.

https://bugs.ruby-lang.org/issues/21262
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Added `Ractor::Port`
  * `Ractor::Port#receive` (support multi-threads)
  * `Rcator::Port#close`
  * `Ractor::Port#closed?`
* Added some methods
  * `Ractor#join`
  * `Ractor#value`
  * `Ractor#monitor`
  * `Ractor#unmonitor`
* Removed some methods
  * `Ractor#take`
  * `Ractor.yield`
* Change the spec
  * `Racotr.select`

You can wait for multiple sequences of messages with `Ractor::Port`.

```ruby
ports = 3.times.map{ Ractor::Port.new }
ports.map.with_index do |port, ri|
  Ractor.new port,ri do |port, ri|
    3.times{|i| port &lt;&lt; "r#{ri}-#{i}"}
  end
end

p ports.each{|port| pp 3.times.map{port.receive}}

```

In this example, we use 3 ports, and 3 Ractors send messages to them respectively.
We can receive a series of messages from each port.

You can use `Ractor#value` to get the last value of a Ractor's block:

```ruby
result = Ractor.new do
  heavy_task()
end.value
```

You can wait for the termination of a Ractor with `Ractor#join` like this:

```ruby
Ractor.new do
  some_task()
end.join
```

`#value` and `#join` are similar to `Thread#value` and `Thread#join`.

To implement `#join`, `Ractor#monitor` (and `Ractor#unmonitor`) is introduced.

This commit changes `Ractor.select()` method.
It now only accepts ports or Ractors, and returns when a port receives a message or a Ractor terminates.

We removes `Ractor.yield` and `Ractor#take` because:
* `Ractor::Port` supports most of similar use cases in a simpler manner.
* Removing them significantly simplifies the code.

We also change the internal thread scheduler code (thread_pthread.c):
* During barrier synchronization, we keep the `ractor_sched` lock to avoid deadlocks.
  This lock is released by `rb_ractor_sched_barrier_end()`
  which is called at the end of operations that require the barrier.
* fix potential deadlock issues by checking interrupts just before setting UBF.

https://bugs.ruby-lang.org/issues/21262
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/etc] Skip TestEtc#test_ractor_parallel on ModGC workflow</title>
<updated>2025-03-28T03:58:14+00:00</updated>
<author>
<name>Naoto Ono</name>
<email>onoto1998@gmail.com</email>
</author>
<published>2025-03-28T03:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8582d93194d5878a5b1aefcaa8ece91910f1df82'/>
<id>8582d93194d5878a5b1aefcaa8ece91910f1df82</id>
<content type='text'>
(https://github.com/ruby/etc/pull/55)

https://bugs.ruby-lang.org/issues/21204

TestEtc#test_ractor_parallel is only failing intermittently on ModGC workflow after 87fb0c4. So, we'll skip this test on ModGC workflow.

https://github.com/ruby/etc/commit/fb037c5162
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/etc/pull/55)

https://bugs.ruby-lang.org/issues/21204

TestEtc#test_ractor_parallel is only failing intermittently on ModGC workflow after 87fb0c4. So, we'll skip this test on ModGC workflow.

https://github.com/ruby/etc/commit/fb037c5162
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/etc] Attempt to re-enable TestEtc#test_ractor_parallel</title>
<updated>2025-03-27T20:39:38+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2025-03-27T20:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=72cb68972c878ca9a221bfffc6b6757807f8b2cf'/>
<id>72cb68972c878ca9a221bfffc6b6757807f8b2cf</id>
<content type='text'>
* If this fails, please revert this commit in ruby/etc
  to keep the repos sync'ed.

https://github.com/ruby/etc/commit/87fb0c4a83
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* If this fails, please revert this commit in ruby/etc
  to keep the repos sync'ed.

https://github.com/ruby/etc/commit/87fb0c4a83
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/etc] Speedup TestEtc#test_ractor_parallel</title>
<updated>2025-03-27T20:39:38+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2025-03-27T20:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0581947af536ec0fc3da295003455404e45b8f4d'/>
<id>0581947af536ec0fc3da295003455404e45b8f4d</id>
<content type='text'>
https://github.com/ruby/etc/commit/18c12c084c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/etc/commit/18c12c084c
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/etc] Increase timeout for test_ractor_parallel</title>
<updated>2025-03-27T20:21:21+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2025-03-27T20:20:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2f1ac3fea377db64e8a7983ef25975418514d99a'/>
<id>2f1ac3fea377db64e8a7983ef25975418514d99a</id>
<content type='text'>
* It seems much slower on macOS (locally on Linux it's always &lt; 1 second).

https://github.com/ruby/etc/commit/9e46857011
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* It seems much slower on macOS (locally on Linux it's always &lt; 1 second).

https://github.com/ruby/etc/commit/9e46857011
</pre>
</div>
</content>
</entry>
<entry>
<title>Pend a test for ractor in etc</title>
<updated>2025-03-27T03:28:28+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2025-03-27T02:56:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1b8e6568e41d1244b5e8a9f1f03348ec1a424863'/>
<id>1b8e6568e41d1244b5e8a9f1f03348ec1a424863</id>
<content type='text'>
... because it is flaky
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... because it is flaky
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/etc] Etc.sysconfdir does not work in a Ractor</title>
<updated>2025-03-25T21:27:16+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2025-03-25T21:20:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bfc5b8305d6a78b8cd011e89538dd7961d88dcff'/>
<id>bfc5b8305d6a78b8cd011e89538dd7961d88dcff</id>
<content type='text'>
* Because it uses RbConfig::CONFIG.
* See https://github.com/ruby/ruby/actions/runs/14069312270/job/39399502142#step:12:947

https://github.com/ruby/etc/commit/12dbe03b6a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Because it uses RbConfig::CONFIG.
* See https://github.com/ruby/ruby/actions/runs/14069312270/job/39399502142#step:12:947

https://github.com/ruby/etc/commit/12dbe03b6a
</pre>
</div>
</content>
</entry>
</feed>
