Skip to content

Commit

Permalink
Add memory leak test for eval kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Feb 21, 2024
1 parent 1c97aba commit 081ee3d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/ruby/test_method.rb
Expand Up @@ -1614,4 +1614,12 @@ def test_method_list
def test_invalidating_CC_ASAN
assert_ruby_status(['-e', 'using Module.new'])
end

def test_kwarg_eval_memory_leak
assert_no_memory_leak([], "", <<~RUBY, rss: true, limit: 1.2)
100_000.times do
eval("Hash.new(foo: 123)")
end
RUBY
end
end

0 comments on commit 081ee3d

Please sign in to comment.