diff options
author | Jean Boussier <[email protected]> | 2024-06-10 15:12:54 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2024-06-11 09:08:48 +0200 |
commit | f0001a4fa7260d0c39e9ddba162f51c549cba2f8 (patch) | |
tree | da935ffbf8ad6f29bbad5aaf31c337cb302496dd /test/ruby | |
parent | d827d3252786a5e1153f4e8bfa30f40a2aaafb95 (diff) |
compile.c: use putspecialobject for RubyVM::FrozenCore
[Bug #20569]
`putobject RubyVM::FrozenCore`, is not serializable, we
have to use `putspecialobject VM_SPECIAL_OBJECT_VMCORE`.
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_iseq.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index a47419253b..1c7de5bb2b 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -167,6 +167,14 @@ class TestISeq < Test::Unit::TestCase end end + def test_ractor_shareable_value_frozen_core + iseq = RubyVM::InstructionSequence.compile(<<~'RUBY') + # shareable_constant_value: literal + REGEX = /#{}/ # [Bug #20569] + RUBY + assert_includes iseq.to_binary, "REGEX".b + end + def test_disasm_encoding src = +"\u{3042} = 1; \u{3042}; \u{3043}" asm = compile(src).disasm |