From 4988758e3a9a2e70ce1b605a88c32010ebe50208 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 20 Nov 2020 16:42:38 -0800 Subject: Update NEWS for String subclass method change [ci skip] --- NEWS.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/NEWS.md b/NEWS.md index bbe2137271..f79fe93872 100644 --- a/NEWS.md +++ b/NEWS.md @@ -267,6 +267,46 @@ Outstanding ones only. named. The returned string cannot be modified. [[Feature #16150]] +* String + + * Modified methods + + * The following methods now return String instances instead of + subclass instances when called on subclass instances: + [[Bug #10845]] + + * `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` + * Warning * Modified method @@ -537,6 +577,7 @@ end [Feature #8709]: https://bugs.ruby-lang.org/issues/8709 [Feature #8948]: https://bugs.ruby-lang.org/issues/8948 [Feature #9573]: https://bugs.ruby-lang.org/issues/9573 +[Bug #10845]: https://bugs.ruby-lang.org/issues/10845 [Bug #12136]: https://bugs.ruby-lang.org/issues/12136 [Bug #12706]: https://bugs.ruby-lang.org/issues/12706 [Feature #13767]: https://bugs.ruby-lang.org/issues/13767 -- cgit v1.2.3