summaryrefslogtreecommitdiff
path: root/include/ruby/internal/encoding/transcode.h
diff options
context:
space:
mode:
authorJean byroot Boussier <jean.boussier+github@shopify.com>2024-06-20 19:39:20 +0200
committerGitHub <noreply@github.com>2024-06-20 10:39:20 -0700
commitd1ffd5ecfa62a049b7c508f30b6912a890de1b32 (patch)
tree2c898bf560f82fb415593570cad2d8fe632b08aa /include/ruby/internal/encoding/transcode.h
parenta3eb5e5c70eaee12964cdd807b8f19950003141f (diff)
String.new(capacity:) don't substract termlen (#11027)
[Bug #20585] This was changed in 36a06efdd9f0604093dccbaf96d4e2cb17874dc8 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>
Diffstat (limited to 'include/ruby/internal/encoding/transcode.h')
0 files changed, 0 insertions, 0 deletions