summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorMax Bernstein <[email protected]>2025-03-10 17:46:27 -0400
committerTakashi Kokubun <[email protected]>2025-04-18 21:52:59 +0900
commit17ff0bc8d7ad32740f10e8b194ab9c15405f7867 (patch)
tree8b7bd712d0f9cfe0bada83b9bb67e9c0e9e95ee4 /test/ruby
parent29c0ef55a79e0cd32270d86870d32254b8f3fd0f (diff)
Compile FixnumLt (https://github.com/Shopify/zjit/pull/48)
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_zjit.rb14
1 files changed, 10 insertions, 4 deletions
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