diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2024-06-10 15:12:54 +0200 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2024-06-15 12:58:19 +0900 |
| commit | e0e1a0f502fe57e7e7e8cf643b8f141b4582d62d (patch) | |
| tree | b3a45991cf13f0ddc7616fb3e910541073a19b0c /test/ruby | |
| parent | ab7dfa7ff270feb155d4715fb7ffcee3668ef38f (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 563aeeeaea..0b94bf993b 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 |
