diff options
| author | Luke Gruber <luke.gruber@shopify.com> | 2025-06-30 11:20:05 -0400 |
|---|---|---|
| committer | John Hawthorn <john@hawthorn.email> | 2025-07-03 13:33:10 -0700 |
| commit | dda5a04f2b4835582dba09ba33797258a61efafe (patch) | |
| tree | ba22f17cf76da044788977cf1bcfa16dfa4d3c4b /test/ruby | |
| parent | cf4d37fbc079116453e69cf08ea8007d0e1c73e6 (diff) | |
Make get/set default internal/external encoding lock-free
Also, make sure autoloading of encodings is safe across ractors.
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_encoding.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb index ae4e4a7cf7..0897908017 100644 --- a/test/ruby/test_encoding.rb +++ b/test/ruby/test_encoding.rb @@ -144,7 +144,9 @@ class TestEncoding < Test::Unit::TestCase rs = [] 100.times do rs << Ractor.new do - "abc".force_encoding(Encoding.list.shuffle.first) + 10_000.times do + "abc".force_encoding(Encoding.list.shuffle.first) + end end end while rs.any? |
