summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2025-04-07 13:34:44 -0400
committerTakashi Kokubun <[email protected]>2025-04-18 21:53:01 +0900
commit3e57c4dceba54b23e0c186591da98d045a8d4be1 (patch)
tree56d0a2c172c26c5910b28f957751e640f3b25fbe /test/ruby
parent97ba8d9c4dbfd8d277b0214aa1306356db586e77 (diff)
Strength reduce to `CCall` for sends landing in simple C methods
A new optimization pass. Also: - Printing for `Insn::CCall` - Wrap `ID` and add convenience method for printing, replacing calls to rb_id2name()
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_zjit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb
index 494d474107..444df8e044 100644
--- a/test/ruby/test_zjit.rb
+++ b/test/ruby/test_zjit.rb
@@ -9,6 +9,14 @@ require_relative '../lib/jit_support'
return unless JITSupport.zjit_supported?
class TestZJIT < Test::Unit::TestCase
+ def test_call_itself
+ assert_compiles '42', <<~RUBY, call_threshold: 2
+ def test = 42.itself
+ test
+ test
+ RUBY
+ end
+
def test_nil
assert_compiles 'nil', %q{
def test = nil