string.c: shrink too big buffer
* string.c (rb_str_resize): shrink the buffer even if new length
is same but it is enough smaller than the capacity.
* file.c (expand_path): shrink expanded path which no longer needs
rooms to append. [ruby-core:63114] [Bug #9934]
* string.c (rb_str_resize): should consider the capacity instead
of the old length, as pointed out by nagachika.
* string.c (rb_str_resize): update capa only when buffer get
reallocated.
http://d.hatena.ne.jp/nagachika/20140613/ruby_trunk_changes_46413_46420#r46413
merge revision(s) r46408,r46410,r46413,r46414,r46424,r46436,r46437: [Backport #9934]
is same but it is enough smaller than the capacity.
* file.c (expand_path): shrink expanded path which no longer needs
rooms to append. [ruby-core:63114] [Bug #9934]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@47215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e