summaryrefslogtreecommitdiff
path: root/test/ruby/test_parse.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r--test/ruby/test_parse.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index ecacdebc70..0a1e3edc66 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -1213,11 +1213,13 @@ x = __ENCODING__
assert_equal([1], a[0])
assert_send([Ractor, :shareable?, a[0]])
- assert_syntax_error("#{<<~"begin;"}\n#{<<~'end;'}", /unshareable expression/)
- begin;
- # shareable_constant_value: literal
- C = ["Not " + "shareable"]
- end;
+ assert_raise_with_message(Ractor::Error, /unshareable/) do
+ Class.new.class_eval("#{<<~"begin;"}\n#{<<~'end;'}")
+ begin;
+ # shareable_constant_value: literal
+ C = ["Not " + "shareable"]
+ end;
+ end
end
=begin