[Bug #19906] Add the test

This commit is contained in:
Nobuyoshi Nakada 2023-10-01 23:58:24 +09:00
parent c74dc8b4af
commit ec3d81629f
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -781,4 +781,14 @@ class TestISeq < Test::Unit::TestCase
end
end;
end
def test_loading_kwargs_memory_leak
assert_no_memory_leak([], "#{<<~"begin;"}", "#{<<~'end;'}", rss: true)
a = RubyVM::InstructionSequence.compile("foo(bar: :baz)").to_binary
begin;
1_000_000.times do
RubyVM::InstructionSequence.load_from_binary(a)
end
end;
end
end