summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2025-06-06 22:00:51 +0900
committerAlan Wu <[email protected]>2025-06-09 22:36:53 +0900
commitec1244cfd2f115485bffa78fc9d887c1b5c43dbe (patch)
tree5bc3c1f3acb0ab00c2676ba0268f5f05c85b7c97 /test
parent038087adf7243366cabb6db32c9034de032397f7 (diff)
ZJIT: Parse opt_not into HIR
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13549
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_zjit.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb
index 9ee1cde35d..b158052ad4 100644
--- a/test/ruby/test_zjit.rb
+++ b/test/ruby/test_zjit.rb
@@ -233,6 +233,13 @@ class TestZJIT < Test::Unit::TestCase
RUBY
end
+ def test_opt_not
+ assert_compiles('[true, true, false]', <<~RUBY, insns: [:opt_not])
+ def test(obj) = !obj
+ return test(nil), test(false), test(0)
+ RUBY
+ end
+
def test_opt_ge
assert_compiles '[false, true, true]', %q{
def test(a, b) = a >= b