1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/pathname/test_ractor.rb
2020-12-20 00:40:47 +09:00

22 lines
475 B
Ruby

# frozen_string_literal: true
require "test/unit"
require "pathname"
class TestPathnameRactor < Test::Unit::TestCase
def setup
skip unless defined? Ractor
end
def test_ractor_shareable
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
begin;
$VERBOSE = nil
require "pathname"
r = Ractor.new Pathname("a") do |x|
x.join(Pathname("b"), Pathname("c"))
end
assert_equal(Pathname("a/b/c"), r.take)
end;
end
end