Age | Commit message (Collapse) | Author |
|
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 <[email protected]>
|
|
* Enhanced RDoc for String#[]
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
* Enhanced RDoc for String#upto
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
* Enhanced RDoc for String#succ!
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
* Enhanced RDoc for String#succ
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
* Enhanced RDoc for String#match?
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Methods:
=~
match
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
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 <[email protected]>
|
|
`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 <[email protected]>
|
|
Methods:
::new
#length
#bytesize
#empty?
#+
#*
#%
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Ractors can access this table simultaneously so we need to sync
accesses.
Notes:
Merged: https://github.com/ruby/ruby/pull/3548
|
|
fstring pool should be sync with other Ractors.
Notes:
Merged: https://github.com/ruby/ruby/pull/3534
|
|
Returns `nil` instead of an empty string when non-integer number is given (to make it 2.7 compatible).
Notes:
Merged-By: soutaro <[email protected]>
|
|
https://bugs.ruby-lang.org/issues/16150#change-87446
Notes:
Merged: https://github.com/ruby/ruby/pull/3514
Merged-By: nobu <[email protected]>
|
|
Removes references to *-convertible thingies.
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
If the passed string is frozen, bare and not shared, then there
is no need to duplicate it.
Ref: 4ab69ebbd7cef8539f687e1f948845d076461dc6
Ref: https://bugs.ruby-lang.org/issues/11386
Notes:
Merged: https://github.com/ruby/ruby/pull/3430
|
|
|
|
When the pattern Regexp given to String#index and String#rindex
contain a /\K/ (lookbehind) operator, these methods return the
position where the beginning of the lookbehind pattern matches, while
they are expected to return the position where the \K matches.
```
# without patch
"abcdbce".index(/b\Kc/) # => 1
"abcdbce".rindex(/b\Kc/) # => 4
```
This patch fixes this problem by using BEG(0) instead of the return
value of rb_reg_search.
```
# with patch
"abcdbce".index(/b\Kc/) # => 2
"abcdbce".rindex(/b\Kc/) # => 5
```
Fixes [Bug #17118]
Notes:
Merged: https://github.com/ruby/ruby/pull/3414
|
|
When the pattern given to String#partition and String#rpartition
contain a /\K/ (lookbehind) operator, the methods return strings
sliced at incorrect positions.
```
# without patch
"abcdbce".partition(/b\Kc/) # => ["a", "c", "cdbce"]
"abcdbce".rpartition(/b\Kc/) # => ["abcd", "c", "ce"]
```
This patch fixes the problem by using BEG(0) instead of the return
value of rb_reg_search.
```
# with patch
"abcdbce".partition(/b\Kc/) # => ["ab", "c", "dbce"]
"abcdbce".rpartition(/b\Kc/) # => ["abcdb", "c", "e"]
```
As a side-effect this patch makes String#partition 2x faster when the
pattern is a costly Regexp by performing Regexp search only once,
which was unexpectedly done twice in the original implementation.
Fixes [Bug #17119]
Notes:
Merged: https://github.com/ruby/ruby/pull/3413
|
|
Use BEG(0) instead of the result of rb_reg_search to handle the cases
when the separator Regexp contains /\K/ (lookbehind) operator.
Fixes [Bug #17113]
Notes:
Merged: https://github.com/ruby/ruby/pull/3407
|
|
|
|
|
|
|
|
Not every compilers understand that rb_raise does not return. When a
function does not end with a return statement, such compilers can issue
warnings. We would better tell them about reachabilities.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|