mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update NEWS [ci skip]
Make core class updates section use a consistent format. Alphabetize core class updates section by class name, and stdlib updates section by library name. Minor formatting changes while here.
This commit is contained in:
parent
bc4ca06f90
commit
b60eaea8e5
1 changed files with 165 additions and 186 deletions
351
NEWS.md
351
NEWS.md
|
@ -120,105 +120,113 @@ Outstanding ones only.
|
||||||
|
|
||||||
* Array
|
* Array
|
||||||
|
|
||||||
* Modified methods
|
* The following methods now return Array instances instead of
|
||||||
|
subclass instances when called on subclass instances:
|
||||||
|
[[Bug #6087]]
|
||||||
|
|
||||||
* The following methods now return Array instances instead of
|
* `Array#drop`
|
||||||
subclass instances when called on subclass instances:
|
* `Array#drop_while`
|
||||||
[[Bug #6087]]
|
* `Array#flatten`
|
||||||
|
* `Array#slice!`
|
||||||
|
* `Array#slice/#[]`
|
||||||
|
* `Array#take`
|
||||||
|
* `Array#take_while`
|
||||||
|
* `Array#uniq`
|
||||||
|
* `Array#*`
|
||||||
|
|
||||||
* `Array#drop`
|
* ConditionVariable
|
||||||
* `Array#drop_while`
|
|
||||||
* `Array#flatten`
|
* `ConditionVariable#wait` may now invoke the `block`/`unblock` scheduler
|
||||||
* `Array#slice!`
|
hooks in a non-blocking context. [[Feature #16786]]
|
||||||
* `Array#slice/#[]`
|
|
||||||
* `Array#take`
|
|
||||||
* `Array#take_while`
|
|
||||||
* `Array#uniq`
|
|
||||||
* `Array#*`
|
|
||||||
|
|
||||||
* Dir
|
* Dir
|
||||||
|
|
||||||
* Modified method
|
* `Dir.glob` and `Dir.[]` now sort the results by default, and
|
||||||
|
accept `sort:` keyword option. [[Feature #8709]]
|
||||||
* Dir.glob and Dir.[] now sort the results by default, and
|
|
||||||
accept `sort:` keyword option. [[Feature #8709]]
|
|
||||||
|
|
||||||
* ENV
|
* ENV
|
||||||
|
|
||||||
* New method
|
* `ENV.except` has been added, which returns a hash excluding the
|
||||||
|
given keys and their values. [[Feature #15822]]
|
||||||
* ENV.except, which returns a hash excluding the given keys
|
|
||||||
and their values. [[Feature #15822]]
|
|
||||||
|
|
||||||
* Encoding
|
* Encoding
|
||||||
|
|
||||||
* New encoding
|
* Added new encoding IBM720. [[Feature #16233]]
|
||||||
|
|
||||||
* Added new encoding IBM720. [[Feature #16233]]
|
* Fiber
|
||||||
|
|
||||||
|
* `Fiber.new(blocking: true/false)` allows you to create non-blocking
|
||||||
|
execution contexts. [[Feature #16786]]
|
||||||
|
|
||||||
|
* `Fiber#blocking?` tells whether the fiber is non-blocking. [[Feature #16786]]
|
||||||
|
|
||||||
|
* `Fiber#backtrace` & `Fiber#backtrace_locations` provide per-fiber backtrace.
|
||||||
|
[[Feature #16815]]
|
||||||
|
|
||||||
|
* The limitation of `Fiber#transfer` is relaxed. [Bug #17221]
|
||||||
|
|
||||||
|
* GC
|
||||||
|
|
||||||
|
* `GC.auto_compact=` and `GC.auto_compact` have been added to control
|
||||||
|
when compaction runs. Setting `auto_compact=` to true will cause
|
||||||
|
compaction to occur during major collections. At the moment,
|
||||||
|
compaction adds significant overhead to major collections, so please
|
||||||
|
test first! [[Feature #17176]]
|
||||||
|
|
||||||
* Hash
|
* Hash
|
||||||
|
|
||||||
* Modified method
|
* `Hash#transform_keys` now accepts a hash that maps keys to new
|
||||||
|
keys. [[Feature #16274]]
|
||||||
|
|
||||||
* Hash#transform_keys now accepts a hash that maps keys to new
|
* `Hash#except` has been added, which returns a hash excluding the
|
||||||
keys. [[Feature #16274]]
|
given keys and their values. [[Feature #15822]]
|
||||||
|
|
||||||
* New method
|
* IO
|
||||||
|
|
||||||
* Hash#except, which returns a hash excluding the given keys
|
* `IO#nonblock?` now defaults to `true`. [[Feature #16786]]
|
||||||
and their values. [[Feature #15822]]
|
|
||||||
|
* `IO#wait_readable`, `IO#wait_writable`, `IO#read`, `IO#write` and other
|
||||||
|
related methods (e.g. `#puts`, `#gets`) may invoke the scheduler hook
|
||||||
|
`#io_wait(io, events, timeout)` in a non-blocking execution context.
|
||||||
|
[[Feature #16786]]
|
||||||
|
|
||||||
* Kernel
|
* Kernel
|
||||||
|
|
||||||
* Modified method
|
* `Kernel#clone` when called with `freeze: false` keyword will call
|
||||||
|
`#initialize_clone` with the `freeze: false` keyword.
|
||||||
|
[[Bug #14266]]
|
||||||
|
|
||||||
* Kernel#clone when called with `freeze: false` keyword will call
|
* `Kernel#clone` when called with `freeze: true` keyword will call
|
||||||
`#initialize_clone` with the `freeze: false` keyword.
|
`#initialize_clone` with the `freeze: true` keyword, and will
|
||||||
[[Bug #14266]]
|
return a frozen copy even if the receiver is unfrozen.
|
||||||
|
[[Feature #16175]]
|
||||||
|
|
||||||
* Kernel#clone when called with `freeze: true` keyword will call
|
* `Kernel#eval` when called with two arguments will use "(eval)"
|
||||||
`#initialize_clone` with the `freeze: true` keyword, and will
|
for `__FILE__` and 1 for `__LINE__` in the evaluated code.
|
||||||
return a frozen copy even if the receiver is unfrozen.
|
[[Bug #4352]]
|
||||||
[[Feature #16175]]
|
|
||||||
|
|
||||||
* Kernel#eval when called with two arguments will use "(eval)"
|
* `Kernel#lambda` now warns if called without a literal block.
|
||||||
for `__FILE__` and 1 for `__LINE__` in the evaluated code.
|
[[Feature #15973]]
|
||||||
[[Bug #4352]]
|
|
||||||
|
|
||||||
* Kernel#lambda now warns if called without a literal block.
|
* `Kernel.sleep(...)` invokes the scheduler hook `#kernel_sleep(...)` in a
|
||||||
[[Feature #15973]]
|
non-blocking execution context. [[Feature #16786]]
|
||||||
|
|
||||||
* Module
|
* Module
|
||||||
|
|
||||||
* Modified method
|
* `Module#include` and `#prepend` now affect classes and modules that
|
||||||
|
have already included or prepended the receiver, mirroring the
|
||||||
|
behavior if the arguments were included in the receiver before
|
||||||
|
the other modules and classes included or prepended the receiver.
|
||||||
|
[[Feature #9573]]
|
||||||
|
|
||||||
* Module#include and #prepend now affect classes and modules that
|
```ruby
|
||||||
have already included or prepended the receiver, mirroring the
|
class C; end
|
||||||
behavior if the arguments were included in the receiver before
|
module M1; end
|
||||||
the other modules and classes included or prepended the receiver.
|
module M2; end
|
||||||
[[Feature #9573]]
|
C.include M1
|
||||||
|
M1.include M2
|
||||||
```ruby
|
p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject]
|
||||||
class C; end
|
```
|
||||||
module M1; end
|
|
||||||
module M2; end
|
|
||||||
C.include M1
|
|
||||||
M1.include M2
|
|
||||||
p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject]
|
|
||||||
```
|
|
||||||
|
|
||||||
* Thread
|
|
||||||
|
|
||||||
* Introduce `Fiber.set_scheduler` for intercepting blocking operations and
|
|
||||||
`Fiber.scheduler` for accessing the current scheduler. See
|
|
||||||
doc/scheduler.md for more details. [[Feature #16786]]
|
|
||||||
* `Fiber.blocking?` tells whether the current execution context is
|
|
||||||
blocking. [[Feature #16786]]
|
|
||||||
* `Thread#join` invokes the scheduler hooks `block`/`unblock` in a
|
|
||||||
non-blocking execution context. [[Feature #16786]]
|
|
||||||
* `Thread.ignore_deadlock` accessor for disabling the default deadlock
|
|
||||||
detection, allowing the use of signal handlers to break deadlock.
|
|
||||||
[[Bug #13768]]
|
|
||||||
|
|
||||||
* Mutex
|
* Mutex
|
||||||
|
|
||||||
|
@ -226,39 +234,12 @@ Outstanding ones only.
|
||||||
should be compatible for essentially all usages and avoids blocking when
|
should be compatible for essentially all usages and avoids blocking when
|
||||||
using a scheduler. [[Feature #16792]]
|
using a scheduler. [[Feature #16792]]
|
||||||
|
|
||||||
* Fiber
|
|
||||||
|
|
||||||
* `Fiber.new(blocking: true/false)` allows you to create non-blocking
|
|
||||||
execution contexts. [[Feature #16786]]
|
|
||||||
* `Fiber#blocking?` tells whether the fiber is non-blocking. [[Feature #16786]]
|
|
||||||
* `Fiber#backtrace` & `Fiber#backtrace_locations` provide per-fiber backtrace.
|
|
||||||
[[Feature #16815]]
|
|
||||||
* The limitation of `Fiber#transfer` is relaxed. [Bug #17221]
|
|
||||||
|
|
||||||
* Kernel
|
|
||||||
|
|
||||||
* `Kernel.sleep(...)` invokes the scheduler hook `#kernel_sleep(...)` in a
|
|
||||||
non-blocking execution context. [[Feature #16786]]
|
|
||||||
|
|
||||||
* Proc
|
* Proc
|
||||||
|
|
||||||
* `Proc#==` and `Proc#eql?` are now defined and will return true for
|
* `Proc#==` and `Proc#eql?` are now defined and will return true for
|
||||||
separate Proc instances if the procs were created from the same block.
|
separate Proc instances if the procs were created from the same block.
|
||||||
[[Feature #14267]]
|
[[Feature #14267]]
|
||||||
|
|
||||||
* IO
|
|
||||||
|
|
||||||
* `IO#nonblock?` now defaults to `true`. [[Feature #16786]]
|
|
||||||
* `IO#wait_readable`, `IO#wait_writable`, `IO#read`, `IO#write` and other
|
|
||||||
related methods (e.g. `#puts`, `#gets`) may invoke the scheduler hook
|
|
||||||
`#io_wait(io, events, timeout)` in a non-blocking execution context.
|
|
||||||
[[Feature #16786]]
|
|
||||||
|
|
||||||
* ConditionVariable
|
|
||||||
|
|
||||||
* `ConditionVariable#wait` may now invoke the `block`/`unblock` scheduler
|
|
||||||
hooks in a non-blocking context. [[Feature #16786]]
|
|
||||||
|
|
||||||
* Queue / SizedQueue
|
* Queue / SizedQueue
|
||||||
|
|
||||||
* `Queue#pop`, `SizedQueue#push` and related methods may now invoke the
|
* `Queue#pop`, `SizedQueue#push` and related methods may now invoke the
|
||||||
|
@ -267,123 +248,128 @@ Outstanding ones only.
|
||||||
|
|
||||||
* Ractor
|
* Ractor
|
||||||
|
|
||||||
* new class to enable parallel execution. See doc/ractor.md for
|
* New class added to enable parallel execution. See doc/ractor.md for
|
||||||
more details.
|
more details.
|
||||||
|
|
||||||
* Symbol
|
|
||||||
|
|
||||||
* Modified method
|
|
||||||
|
|
||||||
* Symbol#to_proc now returns a lambda Proc.
|
|
||||||
[[Feature #16260]]
|
|
||||||
|
|
||||||
* New method
|
|
||||||
|
|
||||||
* Symbol#name, which returns the name of the symbol if it is
|
|
||||||
named. The returned string cannot be modified.
|
|
||||||
[[Feature #16150]]
|
|
||||||
|
|
||||||
* String
|
* String
|
||||||
|
|
||||||
* Modified methods
|
* The following methods now return or yield String instances
|
||||||
|
instead of subclass instances when called on subclass instances:
|
||||||
|
[[Bug #10845]]
|
||||||
|
|
||||||
* The following methods now return or yield String instances
|
* `String#*`
|
||||||
instead of subclass instances when called on subclass instances:
|
* `String#capitalize`
|
||||||
[[Bug #10845]]
|
* `String#center`
|
||||||
|
* `String#chomp`
|
||||||
|
* `String#chop`
|
||||||
|
* `String#delete`
|
||||||
|
* `String#delete_prefix`
|
||||||
|
* `String#delete_suffix`
|
||||||
|
* `String#downcase`
|
||||||
|
* `String#dump`
|
||||||
|
* `String#each_char`
|
||||||
|
* `String#each_grapheme_cluster`
|
||||||
|
* `String#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`
|
||||||
|
|
||||||
* `String#*`
|
* Symbol
|
||||||
* `String#capitalize`
|
|
||||||
* `String#center`
|
* `Symbol#to_proc` now returns a lambda Proc. [[Feature #16260]]
|
||||||
* `String#chomp`
|
|
||||||
* `String#chop`
|
* `Symbol#name` has been added, which returns the name of the symbol
|
||||||
* `String#delete`
|
if it is named. The returned string is frozen. [[Feature #16150]]
|
||||||
* `String#delete_prefix`
|
|
||||||
* `String#delete_suffix`
|
* Thread
|
||||||
* `String#downcase`
|
|
||||||
* `String#dump`
|
* Introduce `Fiber.set_scheduler` for intercepting blocking operations and
|
||||||
* `String#each_char`
|
`Fiber.scheduler` for accessing the current scheduler. See
|
||||||
* `String#each_grapheme_cluster`
|
doc/scheduler.md for more details. [[Feature #16786]]
|
||||||
* `String#each_line`
|
|
||||||
* `String#gsub`
|
* `Fiber.blocking?` tells whether the current execution context is
|
||||||
* `String#ljust`
|
blocking. [[Feature #16786]]
|
||||||
* `String#lstrip`
|
|
||||||
* `String#partition`
|
* `Thread#join` invokes the scheduler hooks `block`/`unblock` in a
|
||||||
* `String#reverse`
|
non-blocking execution context. [[Feature #16786]]
|
||||||
* `String#rjust`
|
|
||||||
* `String#rpartition`
|
* `Thread.ignore_deadlock` accessor for disabling the default deadlock
|
||||||
* `String#rstrip`
|
detection, allowing the use of signal handlers to break deadlock.
|
||||||
* `String#scrub`
|
[[Bug #13768]]
|
||||||
* `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
|
* Warning
|
||||||
|
|
||||||
* Modified method
|
* Warning#warn now supports a category keyword argument.
|
||||||
|
[[Feature #17122]]
|
||||||
* Warning#warn now supports a category kwarg.
|
|
||||||
[[Feature #17122]]
|
|
||||||
|
|
||||||
* GC
|
|
||||||
* New method
|
|
||||||
|
|
||||||
* `GC.auto_compact=`, `GC.auto_compact` can be used to control when
|
|
||||||
compaction runs. Setting `auto_compact=` to true will cause
|
|
||||||
compaction to occur during major collections. At the moment,
|
|
||||||
compaction adds significant overhead to major collections, so please
|
|
||||||
test first!
|
|
||||||
[[Feature #17176]]
|
|
||||||
|
|
||||||
## Stdlib updates
|
## Stdlib updates
|
||||||
|
|
||||||
Outstanding ones only.
|
Outstanding ones only.
|
||||||
|
|
||||||
* RubyGems
|
|
||||||
|
|
||||||
* Update to RubyGems 3.2.0.rc.1
|
|
||||||
|
|
||||||
* Bundler
|
* Bundler
|
||||||
|
|
||||||
* Update to Bundler 2.2.0.rc.1
|
* Update to Bundler 2.2.0.rc.1
|
||||||
|
|
||||||
* Net::HTTP
|
* CSV
|
||||||
|
|
||||||
* New method
|
* Update to CSV 3.1.9
|
||||||
|
|
||||||
* Add Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname
|
* Fiddle
|
||||||
to skip hostname verification. [[Feature #16555]]
|
|
||||||
|
|
||||||
* Modified method
|
* Update to Fiddle 1.0.2
|
||||||
|
|
||||||
* Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print can
|
|
||||||
take request headers as a Hash in the second argument when the first
|
|
||||||
argument is a URI. [[Feature #16686]]
|
|
||||||
|
|
||||||
* IRB
|
* IRB
|
||||||
|
|
||||||
* Update to IRB 1.2.6
|
* Update to IRB 1.2.6
|
||||||
|
|
||||||
|
* Net::HTTP
|
||||||
|
|
||||||
|
* `Net::HTTP#verify_hostname=` and `Net::HTTP#verify_hostname` have been
|
||||||
|
added to skip hostname verification. [[Feature #16555]]
|
||||||
|
|
||||||
|
* `Net::HTTP.get`, `Net::HTTP.get_response`, and `Net::HTTP.get_print`
|
||||||
|
can take the request headers as a Hash in the second argument when the
|
||||||
|
first argument is a URI. [[Feature #16686]]
|
||||||
|
|
||||||
* OpenStruct
|
* OpenStruct
|
||||||
|
|
||||||
* Initialization no longer lazy [[Bug #12136]]
|
* Initialization no longer lazy [[Bug #12136]]
|
||||||
|
|
||||||
* Builtin methods can now be overridden safely. [[Bug #15409]]
|
* Builtin methods can now be overridden safely. [[Bug #15409]]
|
||||||
|
|
||||||
* Implementation uses only methods ending with `!`.
|
* Implementation uses only methods ending with `!`.
|
||||||
|
|
||||||
* Ractor compatible.
|
* Ractor compatible.
|
||||||
|
|
||||||
* Improved support for YAML [[Bug #8382]]
|
* Improved support for YAML [[Bug #8382]]
|
||||||
|
|
||||||
* Use officially discouraged. Read "Caveats" section.
|
* Use officially discouraged. Read "Caveats" section.
|
||||||
|
|
||||||
* Reline
|
* Reline
|
||||||
|
|
||||||
* Update to Reline 0.1.5
|
* Update to Reline 0.1.5
|
||||||
|
|
||||||
|
* RubyGems
|
||||||
|
|
||||||
|
* Update to RubyGems 3.2.0.rc.1
|
||||||
|
|
||||||
* Socket
|
* Socket
|
||||||
|
|
||||||
* TCPSocket.new now supports `resolv_timeout`. [[Feature #17134]]
|
* TCPSocket.new now supports `resolv_timeout`. [[Feature #17134]]
|
||||||
|
@ -393,14 +379,6 @@ Outstanding ones only.
|
||||||
tcp_socket = TCPSocket.new("example.com", 80, resolv_timeout: 10)
|
tcp_socket = TCPSocket.new("example.com", 80, resolv_timeout: 10)
|
||||||
```
|
```
|
||||||
|
|
||||||
* Fiddle
|
|
||||||
|
|
||||||
* Update to Fiddle 1.0.2
|
|
||||||
|
|
||||||
* CSV
|
|
||||||
|
|
||||||
* Update to CSV 3.1.9
|
|
||||||
|
|
||||||
## Compatibility issues
|
## Compatibility issues
|
||||||
|
|
||||||
Excluding feature bug fixes.
|
Excluding feature bug fixes.
|
||||||
|
@ -415,6 +393,7 @@ Excluding feature bug fixes.
|
||||||
|
|
||||||
* Now `{ a: 1 }.each(&->(k, v) { })` raises an ArgumentError
|
* Now `{ a: 1 }.each(&->(k, v) { })` raises an ArgumentError
|
||||||
due to lambda's arity check.
|
due to lambda's arity check.
|
||||||
|
|
||||||
* This is experimental; if it brings a big incompatibility issue,
|
* This is experimental; if it brings a big incompatibility issue,
|
||||||
it may be reverted until 2.8/3.0 release.
|
it may be reverted until 2.8/3.0 release.
|
||||||
|
|
||||||
|
@ -532,11 +511,11 @@ Excluding feature bug fixes.
|
||||||
* Always generate appropriate code for `==`, `nil?`, and `!` calls depending on
|
* Always generate appropriate code for `==`, `nil?`, and `!` calls depending on
|
||||||
a receiver class.
|
a receiver class.
|
||||||
|
|
||||||
* Optimize instance variable access in some core classes like Hash and their subclasses
|
* Optimize instance variable access in some core classes like Hash and their subclasses.
|
||||||
|
|
||||||
* Eliminate VM register access on a method return
|
* Eliminate VM register access on a method return.
|
||||||
|
|
||||||
* Optimize C method call a little
|
* Optimize C method calls a little.
|
||||||
|
|
||||||
## Static analysis
|
## Static analysis
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue