From 17ff0bc8d7ad32740f10e8b194ab9c15405f7867 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Mon, 10 Mar 2025 17:46:27 -0400 Subject: Compile FixnumLt (https://github.com/Shopify/zjit/pull/48) --- test/ruby/test_zjit.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index c937156fa0..6479d7380e 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -73,13 +73,19 @@ class TestZJIT < Test::Unit::TestCase }, call_threshold: 2 end - # FIXME: need to call twice because of call threshold 2, but - # then this fails because of missing FixnumLt - def test_less_than + def test_less_than_true assert_compiles 'true', %q{ def test(a, b) = a < b test(2, 5) - #test(2, 5) + test(2, 5) + }, call_threshold: 2 + end + + def test_less_than_false + assert_compiles '[false, false]', %q{ + def test(a, b) = a < b + test(5, 2) + [test(5, 2), test(2, 2)] }, call_threshold: 2 end -- cgit v1.2.3