diff options
| author | Stan Lo <stan.lo@shopify.com> | 2025-08-13 21:04:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-13 13:04:01 -0700 |
| commit | 549a326f86f345c4cea2de60fe179a5de18d53e2 (patch) | |
| tree | 2111b474a306b077c5c266eb76852bedf97b6fc1 /test/ruby/test_zjit.rb | |
| parent | 2b16f27a35817fde86a984b0810e4c08344272f7 (diff) | |
ZJIT: Implement `StringIntern` codegen (#14207)
* ZJIT: Add test and implement display for StringIntern HIR
Co-authored-by: Emily Samp <emily.samp@shopify.com>
* ZJIT: Implement StringIntern codegen
Co-authored-by: Emily Samp <emily.samp@shopify.com>
* ZJIT: Fix StringIntern's return type
---------
Co-authored-by: Emily Samp <emily.samp@shopify.com>
Diffstat (limited to 'test/ruby/test_zjit.rb')
| -rw-r--r-- | test/ruby/test_zjit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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 |
