diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-10-26 19:43:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 19:43:14 +0900 |
commit | 131c31a9209c61f84d318aa18b61f468f48b8219 (patch) | |
tree | 72dd4a22a3c25f7a912a64adcf2061a3999fd035 /bootstraptest | |
parent | a14611cd54d2ac02daad5ccfe99fc3ec9b0818bd (diff) |
[Bug #19081] Show the caller location in warning for Ractor
The internal location in ractor.rb is not usefull at all.
```
$ ruby -e 'Ractor.new {}'
<internal:ractor>:267: warning: Ractor is experimental, ...
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6629
Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_ractor.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index 6373349e42..0fad04ebbc 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -1618,4 +1618,10 @@ assert_equal "ok", %q{ "ok" } +assert_match /\Atest_ractor\.rb:1:\s+warning:\s+Ractor is experimental/, %q{ + Warning[:experimental] = $VERBOSE = true + STDERR.reopen(STDOUT) + eval("Ractor.new{}.take", nil, "test_ractor.rb", 1) +} + end # if !ENV['GITHUB_WORKFLOW'] |