diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-29 21:40:11 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-29 21:40:11 +0900 |
commit | 5e52fd4bd14a668dd7d85a67f824f2667c6d45ea (patch) | |
tree | 8a8316a982744cc7b5e2651dfde8456fe9cb9dfc /test | |
parent | ec2e04c90d96541502c9b96e66900b4bb01676bb (diff) |
Preserve the encoding of message from outer local variable
In the case of read-only but refering an unshareable object.
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_iseq.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index af92edc494..34124ae966 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -111,6 +111,10 @@ class TestISeq < Test::Unit::TestCase assert_raise_with_message(ArgumentError, /\(#{name}\)/) do Ractor.make_shareable(y) end + y = eval("proc {#{name} = []; proc {|x| #{name}}}").call + assert_raise_with_message(Ractor::IsolationError, /`#{name}'/) do + Ractor.make_shareable(y) + end end def test_disasm_encoding |