From 549a326f86f345c4cea2de60fe179a5de18d53e2 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 13 Aug 2025 21:04:01 +0100 Subject: ZJIT: Implement `StringIntern` codegen (#14207) * ZJIT: Add test and implement display for StringIntern HIR Co-authored-by: Emily Samp * ZJIT: Implement StringIntern codegen Co-authored-by: Emily Samp * ZJIT: Fix StringIntern's return type --------- Co-authored-by: Emily Samp --- test/ruby/test_zjit.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index c78e9c7b9e..58fc9ba639 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -72,6 +72,16 @@ class TestZJIT < Test::Unit::TestCase }, insns: [:setglobal] end + def test_string_intern + assert_compiles ':foo123', %q{ + def test + :"foo#{123}" + end + + test + }, insns: [:intern] + end + def test_setglobal_with_trace_var_exception assert_compiles '"rescued"', %q{ def test -- cgit v1.2.3