aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/string/tr_s_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Update to ruby/spec@3affe1eBenoit Daloze2022-04-251-13/+0
|
* Make String methods return String instances when called on a subclass instanceJeremy Evans2020-11-201-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Update to ruby/spec@032ee74Benoit Daloze2020-05-031-3/+3
|
* Use FrozenError instead of frozen_error_classNobuyoshi Nakada2020-04-011-4/+4
|
* Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans2019-11-181-6/+8
| | | | | | This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby.
* Update to ruby/spec@875a09eBenoit Daloze2019-07-271-3/+3
|
* Update to ruby/spec@7de852dBenoit Daloze2019-04-281-37/+35
|
* Update to ruby/spec@c1b568beregon2018-03-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@0fe33aceregon2017-12-271-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Move spec/rubyspec to spec/ruby for consistencyeregon2017-09-201-0/+136
* Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e