<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/doc/string/new.rdoc, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[DOC] Tweaks for String.new</title>
<updated>2025-05-01T14:51:22+00:00</updated>
<author>
<name>Burdette Lamar</name>
<email>BurdetteLamar@Yahoo.com</email>
</author>
<published>2025-05-01T14:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=79fe8aa0106cd06dd518cabb77cb8ee8236cac43'/>
<id>79fe8aa0106cd06dd518cabb77cb8ee8236cac43</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>String.new(capacity:) don't substract termlen</title>
<updated>2024-06-19T13:11:07+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-06-19T12:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=83f57ca3d225ce06abbc5eef6aec37de4fa36d58'/>
<id>83f57ca3d225ce06abbc5eef6aec37de4fa36d58</id>
<content type='text'>
[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:`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[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:`.
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Enhanced RDoc for String (#5751)</title>
<updated>2022-04-02T19:26:49+00:00</updated>
<author>
<name>Burdette Lamar</name>
<email>BurdetteLamar@Yahoo.com</email>
</author>
<published>2022-04-02T19:26:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7be4d900f0e14e6093c726fbc4416560fd56c931'/>
<id>7be4d900f0e14e6093c726fbc4416560fd56c931</id>
<content type='text'>
    Adds to doc for String.new, also making it compliant with documentation_guide.rdoc.
    Fixes some broken links in io.c (that I failed to correct yesterday).

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    Adds to doc for String.new, also making it compliant with documentation_guide.rdoc.
    Fixes some broken links in io.c (that I failed to correct yesterday).

</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix broken links to encodings.rdoc</title>
<updated>2022-04-02T06:06:12+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-04-02T06:05:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=729b9a85439d5cec7b73f8c0c41c4377e6ce304c'/>
<id>729b9a85439d5cec7b73f8c0c41c4377e6ce304c</id>
<content type='text'>
Also prefers class name based references than file name based
references.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also prefers class name based references than file name based
references.
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Main doc for encodings moved from encoding.c to doc/encodings.rdoc (#5748)</title>
<updated>2022-04-02T01:41:04+00:00</updated>
<author>
<name>Burdette Lamar</name>
<email>BurdetteLamar@Yahoo.com</email>
</author>
<published>2022-04-02T01:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=81741690a0cc6a244821cf4c80030afa2bbc2565'/>
<id>81741690a0cc6a244821cf4c80030afa2bbc2565</id>
<content type='text'>
Main doc for encodings moved from encoding.c to doc/encodings.rdoc</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Main doc for encodings moved from encoding.c to doc/encodings.rdoc</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Use RDoc inclusions in string.c (#5683)</title>
<updated>2022-03-21T19:58:00+00:00</updated>
<author>
<name>Burdette Lamar</name>
<email>BurdetteLamar@Yahoo.com</email>
</author>
<published>2022-03-21T19:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c129b6119dfb8d53521b986465c3a85e08d874fe'/>
<id>c129b6119dfb8d53521b986465c3a85e08d874fe</id>
<content type='text'>


As @peterzhu2118 and @duerst have pointed out, putting string method's RDoc into doc/ (which allows non-ASCII in examples) makes the "click to toggle source" feature not work for that method.

This PR moves the primary method doc back into string.c, then includes RDoc from doc/string/*.rdoc, and also removes doc/string.rdoc.

The affected methods are:

    ::new
    #bytes
    #each_byte
    #each_line
    #split

The call-seq is in string.c because it works there; it did not work when the call-seq is in doc/string/*.rdoc.

This PR also updates the relevant guidance in doc/documentation_guide.rdoc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>


As @peterzhu2118 and @duerst have pointed out, putting string method's RDoc into doc/ (which allows non-ASCII in examples) makes the "click to toggle source" feature not work for that method.

This PR moves the primary method doc back into string.c, then includes RDoc from doc/string/*.rdoc, and also removes doc/string.rdoc.

The affected methods are:

    ::new
    #bytes
    #each_byte
    #each_line
    #split

The call-seq is in string.c because it works there; it did not work when the call-seq is in doc/string/*.rdoc.

This PR also updates the relevant guidance in doc/documentation_guide.rdoc.
</pre>
</div>
</content>
</entry>
</feed>
