string.c: consider capacity

* string.c (rb_str_resize): should consider the capacity instead
  of the old length, as pointed out by nagachika.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Conflicts:
	ChangeLog