summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorMax Bernstein <max.bernstein@shopify.com>2025-04-02 18:07:17 -0400
committerTakashi Kokubun <takashikkbn@gmail.com>2025-04-18 21:53:01 +0900
commitd8a6d43fa486f4f374f1e4d52ebadf27e3e478a6 (patch)
tree6bae9254d2b377b8c8a0a4848e1202fbace7c7df /test/ruby
parent508a0496a5368dad99d7091e9adf9599621d4f2b (diff)
Fix opt_neq HIR codegen
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_zjit.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb
index 7e81193a75..e6f6b16e69 100644
--- a/test/ruby/test_zjit.rb
+++ b/test/ruby/test_zjit.rb
@@ -121,7 +121,17 @@ class TestZJIT < Test::Unit::TestCase
}, call_threshold: 2
end
- def test_opt_neq
+ def test_opt_neq_dynamic
+ # TODO(max): Don't split this test; instead, run all tests with and without
+ # profiling.
+ assert_compiles '[false, true]', %q{
+ def test(a, b) = a != b
+ test(0, 2) # profile opt_neq
+ [test(1, 1), test(0, 1)]
+ }, call_threshold: 1
+ end
+
+ def test_opt_neq_fixnum
assert_compiles '[false, true]', %q{
def test(a, b) = a != b
test(0, 2) # profile opt_neq