diff options
| author | Jean byroot Boussier <jean.boussier+github@shopify.com> | 2024-06-11 20:08:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 11:08:31 -0700 |
| commit | 8951040aadca57fce633b0f714248de78a962c22 (patch) | |
| tree | 344e85a5b6de29813c76f1f4fb2b927036724665 /test/ruby | |
| parent | 4c50d23245689761e04db450ced9fe9fa76997d0 (diff) | |
[3.3 backport] compile.c: use putspecialobject for RubyVM::FrozenCore (#10962)
compile.c: use putspecialobject for RubyVM::FrozenCore
[Bug #20569]
`putobject RubyVM::FrozenCore`, is not serializable, we
have to use `putspecialobject VM_SPECIAL_OBJECT_VMCORE`.
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
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 b0896511d8..e8c6382300 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 |
