diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/gvl/test_last_thread.rb | 3 | ||||
-rw-r--r-- | test/ruby/test_zjit.rb | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/test/-ext-/gvl/test_last_thread.rb b/test/-ext-/gvl/test_last_thread.rb index f1bebafeea..f63d98aab1 100644 --- a/test/-ext-/gvl/test_last_thread.rb +++ b/test/-ext-/gvl/test_last_thread.rb @@ -15,8 +15,7 @@ class TestLastThread < Test::Unit::TestCase t1 = Time.now t = t1 - t0 - assert_in_delta(1.0, t, 0.16) + assert_in_delta(1.0, t, 0.18) end; end end - diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index e10e9a8742..6e0f274c30 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -714,6 +714,16 @@ class TestZJIT < Test::Unit::TestCase end end + def test_dupn + assert_compiles '[[1], [1, 1], :rhs, [nil, :rhs]]', <<~RUBY, insns: [:dupn] + def test(array) = (array[1, 2] ||= :rhs) + + one = [1, 1] + start_empty = [] + [test(one), one, test(start_empty), start_empty] + RUBY + end + def test_send_backtrace backtrace = [ "-e:2:in 'Object#jit_frame1'", |