1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add another test for frame omitted inlining

This commit is contained in:
Takashi Kokubun 2019-08-12 20:40:13 +09:00
parent a5f9306065
commit e6a0a954c9
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -859,6 +859,22 @@ class TestJIT < Test::Unit::TestCase
end;
end
def test_frame_omitted_inlining
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "true\ntrue\ntrue\n", success_count: 1, min_calls: 2)
begin;
class Numeric
remove_method :zero?
def zero?
self == 0
end
end
3.times do
p 0.zero?
end
end;
end
def test_block_handler_with_possible_frame_omitted_inlining
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "70.0\n70.0\n70.0\n", success_count: 2, min_calls: 2)
begin;