Skip to content

Commit

Permalink
Test for memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed May 1, 2024
1 parent acc76c8 commit 57eca0a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/ruby/test_ast.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,15 @@ def test_unused_block_local_variable
end
end

def test_memory_leak
assert_no_memory_leak([], "#{<<~"begin;"}", "\n#{<<~'end;'}", rss: true)
begin;
1_000_000.times do
eval("")
end
end;
end

def assert_error_tolerant(src, expected, keep_tokens: false)
begin
verbose_bak, $VERBOSE = $VERBOSE, false
Expand Down

0 comments on commit 57eca0a

Please sign in to comment.