diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-11-12 17:22:45 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-11-12 18:35:16 +0900 |
| commit | 96a425e5c53ab63f2b3065fd970481a80794445b (patch) | |
| tree | a7a0952629c785c1eacf05fe60e595ce09c8f937 /tool/lib | |
| parent | f958800574c42e69844db7305e69d1f494529543 (diff) | |
Support multiple require in assert_ractor
Diffstat (limited to 'tool/lib')
| -rw-r--r-- | tool/lib/core_assertions.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index fbf2c1a8bb..6570af52aa 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -394,7 +394,11 @@ eom shim_value = "class Ractor; alias value take; end" unless Ractor.method_defined?(:value) shim_join = "class Ractor; alias join take; end" unless Ractor.method_defined?(:join) - require = "require #{require.inspect}" if require + if require + require = [require] unless require.is_a?(Array) + require = require.map {|r| "require #{r.inspect}"}.join("\n") + end + if require_relative dir = File.dirname(caller_locations[0,1][0].absolute_path) full_path = File.expand_path(require_relative, dir) |
