Skip to content

Use Ractor#value as Ractor#take is removed #344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/csv/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ def with_default_internal(encoding)
end
end
end

class Ractor
alias value take unless method_defined? :value
end if defined?(Ractor)
4 changes: 2 additions & 2 deletions test/csv/interface/test_read.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_foreach_in_ractor
["1", "2", "3"],
["4", "5"],
]
assert_equal(rows, ractor.take)
assert_equal(rows, ractor.value)
end
end

Expand Down Expand Up @@ -315,7 +315,7 @@ def test_read_in_ractor
["1", "2", "3"],
["4", "5"],
]
assert_equal(rows, ractor.take)
assert_equal(rows, ractor.value)
end
end

Expand Down
5 changes: 2 additions & 3 deletions test/csv/interface/test_write.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_generate_default_in_ractor
csv << [1, 2, 3] << [4, nil, 5]
end
end
assert_equal(<<-CSV, ractor.take)
assert_equal(<<-CSV, ractor.value)
1,2,3
4,,5
CSV
Expand Down Expand Up @@ -125,7 +125,6 @@ def test_append_row
CSV
end


if respond_to?(:ractor)
ractor
def test_append_row_in_ractor
Expand All @@ -136,7 +135,7 @@ def test_append_row_in_ractor
CSV::Row.new([], ["a", "b", "c"])
end
end
ractor.take
ractor.value
assert_equal(<<-CSV, File.read(@output.path, mode: "rb"))
1,2,3
a,b,c
Expand Down
Loading