Skip to content

Commit 94287b1

Browse files
committed
Make the expectation more precise in Ractor.make_shareable(Proc) test
1 parent 33a026f commit 94287b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bootstraptest/test_ractor.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,15 +1188,15 @@ def /(other)
11881188
}
11891189

11901190
# Ractor.make_shareable(a_proc) requires a shareable receiver
1191-
assert_equal '[:ok, :error]', %q{
1191+
assert_equal '[:ok, "Proc\'s self is not shareable:"]', %q{
11921192
pr1 = nil.instance_exec { Proc.new{} }
11931193
pr2 = Proc.new{}
11941194
11951195
[pr1, pr2].map do |pr|
11961196
begin
11971197
Ractor.make_shareable(pr)
1198-
rescue Ractor::Error
1199-
:error
1198+
rescue Ractor::Error => e
1199+
e.message[/^.+?:/]
12001200
else
12011201
:ok
12021202
end

0 commit comments

Comments
 (0)