Age | Commit message (Collapse) | Author |
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
String#initialize can leak memory when called on a string that is marked
with STR_NOFREE because it does not unset the STR_NOFREE flag.
Notes:
Merged: https://github.com/ruby/ruby/pull/4814
|
|
And the NULL string must be of size 0.
|
|
Each of these methods calls str_modify_keep_cr before
term filling, which should ensure the backing string
uses private memory, and therefore term filling should
not affect other strings.
Skipping the term filling was added in
a707ab4bc8a29241440f56696098efa2f7f3ff45.
Fixes [Bug #12540]
Notes:
Merged: https://github.com/ruby/ruby/pull/4731
|
|
7 spaces were used for 2 levels of indentation. This commit changes it
to use 8 spaces.
Notes:
Merged: https://github.com/ruby/ruby/pull/4706
|
|
Descriptions for return values of -1 and 1 were reversed.
Notes:
Merged: https://github.com/ruby/ruby/pull/4698
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4695
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4676
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4628
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3972
|
|
At compilation time with RUBY_DEBUG enabled, check if the removal
version has been reached.
Notes:
Merged: https://github.com/ruby/ruby/pull/3972
|
|
|
|
We came across a bug in our code because we assumed `String#hash` to be consistent across Ruby processes, which was incorrect.
Our search lead us to `Object#hash` which has the right warning that `String#hash` doesn't. We also noticed that a previous version of the documentation for `String#hash` pointed to `Object#hash` that was removed by https://github.com/ruby/ruby/pull/3565.
We think this removal might not be intended and just got missed amidst other changes.
Notes:
Merged: https://github.com/ruby/ruby/pull/4498
|
|
|
|
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
|
|
|
|
|
|
If called with an autoloaded encoding that was not yet
initialized, `rb_enc_interned_str` would crash with
a NULL pointer exception.
See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841
Notes:
Merged: https://github.com/ruby/ruby/pull/4290
|
|
The documentation already specifies that they strip whitespace
and defines whitespace to include null.
This wraps the new behavior in the appropriate guards in the specs,
but does not specify behavior for previous versions, because this
is a bug that could be backported.
Fixes [Bug #17467]
Notes:
Merged: https://github.com/ruby/ruby/pull/4164
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4174
Merged-By: nobu <nobu@ruby-lang.org>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4169
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4151
|
|
|
|
Link was correct; its target was incorrect; now fixed.
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
* What's Here for String RDoc
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4013
|
|
https://hackerone.com/reports/1042722
Notes:
Merged: https://github.com/ruby/ruby/pull/4001
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3966
|
|
|
|
Also document that both :deprecated and :experimental are supported
:category option values.
The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.
Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).
Add assert_deprecated_warn to test assertions. Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
Notes:
Merged: https://github.com/ruby/ruby/pull/3917
|
|
Passing current ec can improve performance of newobj. This patch
tries it for Array and String literals ([] and '').
Notes:
Merged: https://github.com/ruby/ruby/pull/3842
|
|
Same as 8247b8edde, should not use rb_str_modify() here.
https://bugs.ruby-lang.org/issues/17343#change-88858
Notes:
Merged: https://github.com/ruby/ruby/pull/3833
|
|
Fixes [Feature #13381]
When passed a `fake_str`, `register_fstring` would create new strings
with `str_new_static`. That's not what was expected, and answer
almost no use cases.
Notes:
Merged: https://github.com/ruby/ruby/pull/3786
|
|
|
|
since 58325daae3beefda13ed100782cd19a89cc68771.
../string.c:1339:1: warning: ‘str_new_empty’ defined but not used [-Wunused-function]
1339 | str_new_empty(VALUE str)
| ^~~~~~~~~~~~~
|
|
This modifies the following String methods to return String instances
instead of subclass instances:
* String#*
* String#capitalize
* String#center
* String#chomp
* String#chop
* String#delete
* String#delete_prefix
* String#delete_suffix
* String#downcase
* String#dump
* String#each/#each_line
* String#gsub
* String#ljust
* String#lstrip
* String#partition
* String#reverse
* String#rjust
* String#rpartition
* String#rstrip
* String#scrub
* String#slice!
* String#slice/#[]
* String#split
* String#squeeze
* String#strip
* String#sub
* String#succ/#next
* String#swapcase
* String#tr
* String#tr_s
* String#upcase
This also fixes a bug in String#swapcase where it would return the
receiver instead of a copy of the receiver if the receiver was the
empty string.
Some string methods were left to return subclass instances:
* String#+@
* String#-@
Both of these methods will return the receiver (subclass instance)
in some cases, so it is best to keep the returned class consistent.
Fixes [#10845]
Notes:
Merged: https://github.com/ruby/ruby/pull/3701
|
|
Fixes [Feature #13381]
Notes:
Merged: https://github.com/ruby/ruby/pull/3586
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3589
|
|
* Enhanced RDoc for String#insert
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
* Enhanced RDoc for String#[]
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
* Enhanced RDoc for String#upto
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
* Enhanced RDoc for String#succ!
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
* Enhanced RDoc for String#succ
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
* Enhanced RDoc for String#match?
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
Methods:
=~
match
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
Makes some methods doc compliant with https://github.com/ruby/ruby/blob/master/doc/method_documentation.rdoc. Also, other minor revisions to make more consistent.
Methods:
==
===
eql?
<=>
casecmp
casecmp?
index
rindex
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
`encoding` can be not only an encoding name, but also an Encoding object.
```
s = String.new('foo', encoding: Encoding::US_ASCII)
s.encoding # => #<Encoding:US-ASCII>
```
|
|
Makes some methods doc compliant with https://github.com/ruby/ruby/blob/master/doc/method_documentation.rdoc. Also, other minor revisions to make more consistent.
Methods:
try_convert
+string
-string
concat
<<
prepend
hash
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|