summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-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 8771a31754..8fe5ae2df9 100644
--- a/test/ruby/test_zjit.rb
+++ b/test/ruby/test_zjit.rb
@@ -212,6 +212,13 @@ class TestZJIT < Test::Unit::TestCase
RUBY
end
+ def test_opt_succ
+ assert_compiles('[0, "B"]', <<~RUBY, insns: [:opt_succ])
+ def test(obj) = obj.succ
+ return test(-1), test("A")
+ RUBY
+ end
+
def test_opt_ge
assert_compiles '[false, true, true]', %q{
def test(a, b) = a >= b