diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-12 20:40:13 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-12 20:40:13 +0900 |
commit | e6a0a954c9ef5170b8b25088455106b3748c2187 (patch) | |
tree | 5dca2b600982b4d2690f5fca63b5e44a6d2b0c8c /test/ruby | |
parent | a5f9306065b8a50cca6cdb65003d0c36d1180c09 (diff) | |
download | ruby-e6a0a954c9ef5170b8b25088455106b3748c2187.tar.gz |
Add another test for frame omitted inlining
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_jit.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index 188c013691..c9255f20b0 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -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; |