diff options
| author | John Hawthorn <john@hawthorn.email> | 2024-02-15 15:32:01 -0800 |
|---|---|---|
| committer | John Hawthorn <john@hawthorn.email> | 2024-02-20 18:55:00 -0800 |
| commit | 081ee3d35509110f383cb7dd8d1205def0cdd1e8 (patch) | |
| tree | fffcd9cb9249282a6005bdb45909338130821bfd /test/ruby | |
| parent | 1c97abaabae6844c861705fd07f532292dcffa74 (diff) | |
Add memory leak test for eval kwargs
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_method.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index fd05fde3da..e563e53cd5 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -1614,4 +1614,12 @@ class TestMethod < Test::Unit::TestCase 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 |
