mirror of
https://github.com/ruby/ruby.git
synced 2026-10-29 17:06:21 +08:00
[Bug #20585]
This was changed in 36a06efdd9 because
`String.new(1024)` would end up allocating `1025` bytes, but the problem
with this change is that the caller may be trying to right size a String.
So instead, we should just better document the behavior of `capacity:`.
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>