diff options
Diffstat (limited to 'jni/ruby/test/-ext-/string/test_modify_expand.rb')
-rw-r--r-- | jni/ruby/test/-ext-/string/test_modify_expand.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 |