diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-10-01 23:58:24 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-10-01 23:58:24 +0900 |
commit | ec3d81629ff193e847dcab9afb20dffa14f2582a (patch) | |
tree | 32b2997b56701379a13815a24f5ae7cf5c696e20 | |
parent | c74dc8b4af4ef1b32f65587f083fbeba4ca186fa (diff) | |
download | ruby-ec3d81629ff193e847dcab9afb20dffa14f2582a.tar.gz |
[Bug #19906] Add the test
-rw-r--r-- | test/ruby/test_iseq.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 80fe9b0f06..6a1a1ea8c1 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -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 |