<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/bootstraptest/test_ractor.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) f6cbf499bc98b851034fffb49fcbb59d495f6f7b: [Backport #21354]</title>
<updated>2025-07-14T21:10:16+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-07-14T21:10:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=82e05dc945e3e2c5ab22be661f6caf6c7436461f'/>
<id>82e05dc945e3e2c5ab22be661f6caf6c7436461f</id>
<content type='text'>
	Fix Symbol#to_proc (rb_sym_to_proc) to be ractor safe

	In non-main ractors, don't use `sym_proc_cache`. It is not thread-safe
	to add to this array without a lock and also it leaks procs from one
	ractor to another. Instead, we create a new proc each time. If this
	results in poor performance we can come up with a solution later.

	Fixes [Bug #21354]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix Symbol#to_proc (rb_sym_to_proc) to be ractor safe

	In non-main ractors, don't use `sym_proc_cache`. It is not thread-safe
	to add to this array without a lock and also it leaks procs from one
	ractor to another. Instead, we create a new proc each time. If this
	results in poor performance we can come up with a solution later.

	Fixes [Bug #21354]
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip an unstable Ractor test</title>
<updated>2025-05-06T22:35:58+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-05-06T22:35:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4aac15063094d30c3ed0c3639ffbf54a595731a5'/>
<id>4aac15063094d30c3ed0c3639ffbf54a595731a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ractor move of unshareable frozen objects</title>
<updated>2024-12-24T02:38:44+00:00</updated>
<author>
<name>Luke Gruber</name>
<email>luke.gru@gmail.com</email>
</author>
<published>2024-02-16T19:08:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=38af38edcbceb9d17aaf84420008fe839f77e42f'/>
<id>38af38edcbceb9d17aaf84420008fe839f77e42f</id>
<content type='text'>
These objects didn't retain their frozen status after the move

Bug [#19408]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These objects didn't retain their frozen status after the move

Bug [#19408]
</pre>
</div>
</content>
</entry>
<entry>
<title>`Ractor.set_if_absent(key)`</title>
<updated>2024-12-12T21:22:13+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2024-12-12T19:52:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0bdb38ba6be208064a514c12a9b80328645689f8'/>
<id>0bdb38ba6be208064a514c12a9b80328645689f8</id>
<content type='text'>
to initialize ractor local storage in thread-safety.
[Feature #20875]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to initialize ractor local storage in thread-safety.
[Feature #20875]
</pre>
</div>
</content>
</entry>
<entry>
<title>[MMTk/CI] Skip Ractor btests with MMTk</title>
<updated>2024-12-06T09:48:30+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2024-12-02T18:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=58b4e249ed8d33fc78528bc77516d541c04d65f2'/>
<id>58b4e249ed8d33fc78528bc77516d541c04d65f2</id>
<content type='text'>
currently these are flaky, so until we can make them more robust, we'll
skip them for MMTk CI
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
currently these are flaky, so until we can make them more robust, we'll
skip them for MMTk CI
</pre>
</div>
</content>
</entry>
<entry>
<title>skip `SystemStackError`</title>
<updated>2024-11-08T09:02:46+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2024-11-06T07:04:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=78064d0770c40af89f9a57eb111a27fba00b2ec8'/>
<id>78064d0770c40af89f9a57eb111a27fba00b2ec8</id>
<content type='text'>
with -O0 build, prism parser consumes a lot of machine stack and
it doesn't work with minimum machine stack for threads, which
specified with `RUBY_THREAD_MACHINE_STACK_SIZE=1`.

So simply ignore `SystemStackError` for btest.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with -O0 build, prism parser consumes a lot of machine stack and
it doesn't work with minimum machine stack for threads, which
specified with `RUBY_THREAD_MACHINE_STACK_SIZE=1`.

So simply ignore `SystemStackError` for btest.
</pre>
</div>
</content>
</entry>
<entry>
<title>support `require` in non-main Ractors</title>
<updated>2024-11-08T09:02:46+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2024-11-04T19:54:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aa63699d10e489bc6d9c13406fc47f581001568b'/>
<id>aa63699d10e489bc6d9c13406fc47f581001568b</id>
<content type='text'>
Many libraries should be loaded on the main ractor because of
setting constants with unshareable objects and so on.

This patch allows to call `requore` on non-main Ractors by
asking the main ractor to call `require` on it. The calling ractor
waits for the result of `require` from the main ractor.

If the `require` call failed with some reasons, an exception
objects will be deliverred from the main ractor to the calling ractor
if it is copy-able.

Same on `require_relative` and `require` by `autoload`.

Now `Ractor.new{pp obj}` works well (the first call of `pp` requires
`pp` library implicitly).

[Feature #20627]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many libraries should be loaded on the main ractor because of
setting constants with unshareable objects and so on.

This patch allows to call `requore` on non-main Ractors by
asking the main ractor to call `require` on it. The calling ractor
waits for the result of `require` from the main ractor.

If the `require` call failed with some reasons, an exception
objects will be deliverred from the main ractor to the calling ractor
if it is copy-able.

Same on `require_relative` and `require` by `autoload`.

Now `Ractor.new{pp obj}` works well (the first call of `pp` requires
`pp` library implicitly).

[Feature #20627]
</pre>
</div>
</content>
</entry>
<entry>
<title>Update bootstraptest test for colon-style hash inspect</title>
<updated>2024-10-03T09:47:09+00:00</updated>
<author>
<name>tompng</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-06-07T16:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f4e548924e36c9b1d19551a943881cb57bb41471'/>
<id>f4e548924e36c9b1d19551a943881cb57bb41471</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix `defined?(@ivar)` with Ractors</title>
<updated>2024-07-11T19:43:14+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2024-07-10T20:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=43aee3393d70f8893e312b38a9a30c1dba295c41'/>
<id>43aee3393d70f8893e312b38a9a30c1dba295c41</id>
<content type='text'>
`defined?(@ivar)` on the non main Ractor has two issues:

1. raising an exception

```ruby
class C
  @iv1 = []
  def self.defined_iv1 = defined?(@iv1)
end

Ractor.new{
  p C.defined_iv1
  #=&gt; can not get unshareable values from instance variables of classes/modules from non-main Ractors (Ractor::IsolationError)
}.take
```

-&gt; Do not raise an exception but return `"instance-variable"` because
it is defined.

2. returning `"instance-variable"` if there is not defined.

```
class C
  # @iv2 is not defined
  def self.defined_iv2 = defined?(@iv2)
end

Ractor.new{
  p C.defined_iv2 #=&gt; "instance-variable"
}.take
```

-&gt; returns `nil`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`defined?(@ivar)` on the non main Ractor has two issues:

1. raising an exception

```ruby
class C
  @iv1 = []
  def self.defined_iv1 = defined?(@iv1)
end

Ractor.new{
  p C.defined_iv1
  #=&gt; can not get unshareable values from instance variables of classes/modules from non-main Ractors (Ractor::IsolationError)
}.take
```

-&gt; Do not raise an exception but return `"instance-variable"` because
it is defined.

2. returning `"instance-variable"` if there is not defined.

```
class C
  # @iv2 is not defined
  def self.defined_iv2 = defined?(@iv2)
end

Ractor.new{
  p C.defined_iv2 #=&gt; "instance-variable"
}.take
```

-&gt; returns `nil`
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix interrupts during Ractor.select</title>
<updated>2024-05-05T15:14:53+00:00</updated>
<author>
<name>Luke Gruber</name>
<email>luke.gru@gmail.com</email>
</author>
<published>2024-05-05T15:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6747fbe77dcac26a457bb1386f55f3c27321040a'/>
<id>6747fbe77dcac26a457bb1386f55f3c27321040a</id>
<content type='text'>
Fixes [Bug #20168]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #20168]
</pre>
</div>
</content>
</entry>
</feed>
