From 5828872ec4814a5a07f5f4c7686c543127619197 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Wed, 10 Dec 2025 13:13:21 -0800 Subject: [PATCH] Update Ractor warning message Although the Ractor API is still experimental and may change, and there may be some implementation issues, we should no longer say that there are many. Hopefully we can remove this warning entirely for Ruby 4.1 --- bootstraptest/test_ractor.rb | 2 +- ractor.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index 13c4652d37..0b7a43272c 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -1661,7 +1661,7 @@ assert_equal 'true', %q{ } # check experimental warning -assert_match /\Atest_ractor\.rb:1:\s+warning:\s+Ractor is experimental/, %q{ +assert_match /\Atest_ractor\.rb:1:\s+warning:\s+Ractor API is experimental/, %q{ Warning[:experimental] = $VERBOSE = true STDERR.reopen(STDOUT) eval("Ractor.new{}.value", nil, "test_ractor.rb", 1) diff --git a/ractor.rb b/ractor.rb index d992f0a047..70ce1a9fff 100644 --- a/ractor.rb +++ b/ractor.rb @@ -230,8 +230,8 @@ class Ractor b = block # TODO: builtin bug raise ArgumentError, "must be called with a block" unless block if __builtin_cexpr!("RBOOL(ruby_single_main_ractor)") - Kernel.warn("Ractor is experimental, and the behavior may change in future versions of Ruby! " \ - "Also there are many implementation issues.", uplevel: 0, category: :experimental) + Kernel.warn("Ractor API is experimental and may change in future versions of Ruby.", + uplevel: 0, category: :experimental) end loc = caller_locations(1, 1).first loc = "#{loc.path}:#{loc.lineno}"