Skip to content

Commit ec3d816

Browse files
committed
[Bug #19906] Add the test
1 parent c74dc8b commit ec3d816

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/ruby/test_iseq.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,4 +781,14 @@ def test_unreachable_pattern_matching
781781
end
782782
end;
783783
end
784+
785+
def test_loading_kwargs_memory_leak
786+
assert_no_memory_leak([], "#{<<~"begin;"}", "#{<<~'end;'}", rss: true)
787+
a = RubyVM::InstructionSequence.compile("foo(bar: :baz)").to_binary
788+
begin;
789+
1_000_000.times do
790+
RubyVM::InstructionSequence.load_from_binary(a)
791+
end
792+
end;
793+
end
784794
end

0 commit comments

Comments
 (0)