From fcbf63e62c627deae76c1b8cb8c0876c536ed811 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 16 Mar 2020 18:49:26 +0900 Subject: Fresh start --- jni/ruby/test/-ext-/string/test_modify_expand.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 jni/ruby/test/-ext-/string/test_modify_expand.rb (limited to 'jni/ruby/test/-ext-/string/test_modify_expand.rb') diff --git a/jni/ruby/test/-ext-/string/test_modify_expand.rb b/jni/ruby/test/-ext-/string/test_modify_expand.rb new file mode 100644 index 0000000..34b7be7 --- /dev/null +++ b/jni/ruby/test/-ext-/string/test_modify_expand.rb @@ -0,0 +1,15 @@ +require 'test/unit' +require "-test-/string/string" + +class Test_StringModifyExpand < Test::Unit::TestCase + def test_modify_expand_memory_leak + assert_no_memory_leak(["-r-test-/string/string"], + <<-PRE, <<-CMD, "rb_str_modify_expand()", limit: 2.5) + s=Bug::String.new + PRE + size = $initial_size + 10.times{s.modify_expand!(size)} + s.replace("") + CMD + end +end -- cgit v1.2.3