From ec657f44dca3b84fde2a0b3b66c4e0e74a4cdce8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 13 Oct 2021 16:48:35 +0900 Subject: Refine the error message for hidden variables --- test/ruby/test_iseq.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 19357a774d..2b3282d5fb 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -135,6 +135,11 @@ class TestISeq < Test::Unit::TestCase assert_raise_with_message(Ractor::IsolationError, /`#{name}'/) do Ractor.make_shareable(y) end + obj = Object.new + def obj.foo(*) ->{super} end + assert_raise_with_message(Ractor::IsolationError, /hidden variable/) do + Ractor.make_shareable(obj.foo) + end end def test_disasm_encoding -- cgit v1.2.3