From 99d96a89ce57edc4de2ff1acb1d4ed7737144140 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 4 Aug 2010 07:09:47 +0000 Subject: * string.c (rb_str_resize): should copy the content properly. a patch from Jeremy Evans at [ruby-core:31615]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/-ext-/test_bug-3652.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/-ext-/test_bug-3652.rb (limited to 'test/-ext-') diff --git a/test/-ext-/test_bug-3652.rb b/test/-ext-/test_bug-3652.rb new file mode 100644 index 0000000000..0e4d658081 --- /dev/null +++ b/test/-ext-/test_bug-3652.rb @@ -0,0 +1,12 @@ +require 'test/unit' +require '-test-/bug-3652/bug' + +class Test_BUG_3652 < Test::Unit::TestCase + def test_block_call_id + bug3652 = '[ruby-core:31615]' + s = "123456789012345678901234" + assert_equal(s, Bug.str_resize(127, s), bug3652) + s = "123456789" + assert_equal(s, Bug.str_resize(127, s), bug3652) + end +end -- cgit v1.2.3