diff options
author | Jeremy Evans <code@jeremyevans.net> | 2020-12-03 09:02:42 -0800 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2020-12-03 09:06:44 -0800 |
commit | b60eaea8e54fb003a79a5a165c6ee55d653322f6 (patch) | |
tree | 9338737c84fd48c3dae558a782824cc043dcb9c9 /NEWS.md | |
parent | bc4ca06f90c0da09fe3a6d2ab29e260b9b9cfe1b (diff) |
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.
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 345 |
1 files changed, 162 insertions, 183 deletions
@@ -120,105 +120,113 @@ Outstanding ones only. * Array - * Modified methods - - * The following methods now return Array instances instead of - subclass instances when called on subclass instances: - [[Bug #6087]] - - * `Array#drop` - * `Array#drop_while` - * `Array#flatten` - * `Array#slice!` - * `Array#slice/#[]` - * `Array#take` - * `Array#take_while` - * `Array#uniq` - * `Array#*` + * The following methods now return Array instances instead of + subclass instances when called on subclass instances: + [[Bug #6087]] + + * `Array#drop` + * `Array#drop_while` + * `Array#flatten` + * `Array#slice!` + * `Array#slice/#[]` + * `Array#take` + * `Array#take_while` + * `Array#uniq` + * `Array#*` -* Dir +* ConditionVariable + + * `ConditionVariable#wait` may now invoke the `block`/`unblock` scheduler + hooks in a non-blocking context. [[Feature #16786]] - * Modified method +* Dir - * 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 - * New method - - * ENV.except, which returns a hash excluding the given keys - and their values. [[Feature #15822]] + * `ENV.except` has been added, which returns a hash excluding the + given keys and their values. [[Feature #15822]] * Encoding - * New encoding + * Added new encoding IBM720. [[Feature #16233]] - * Added new encoding IBM720. [[Feature #16233]] +* Fiber -* Hash + * `Fiber.new(blocking: true/false)` allows you to create non-blocking + execution contexts. [[Feature #16786]] - * Modified method + * `Fiber#blocking?` tells whether the fiber is non-blocking. [[Feature #16786]] - * Hash#transform_keys now accepts a hash that maps keys to new - keys. [[Feature #16274]] + * `Fiber#backtrace` & `Fiber#backtrace_locations` provide per-fiber backtrace. + [[Feature #16815]] - * New method + * The limitation of `Fiber#transfer` is relaxed. [Bug #17221] - * Hash#except, which returns a hash excluding the given keys - and their values. [[Feature #15822]] +* GC -* Kernel + * `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]] - * Modified method +* Hash - * Kernel#clone when called with `freeze: false` keyword will call - `#initialize_clone` with the `freeze: false` keyword. - [[Bug #14266]] + * `Hash#transform_keys` now accepts a hash that maps keys to new + keys. [[Feature #16274]] - * Kernel#clone when called with `freeze: true` keyword will call - `#initialize_clone` with the `freeze: true` keyword, and will - return a frozen copy even if the receiver is unfrozen. - [[Feature #16175]] + * `Hash#except` has been added, which returns a hash excluding the + given keys and their values. [[Feature #15822]] - * Kernel#eval when called with two arguments will use "(eval)" - for `__FILE__` and 1 for `__LINE__` in the evaluated code. - [[Bug #4352]] +* IO - * Kernel#lambda now warns if called without a literal block. - [[Feature #15973]] + * `IO#nonblock?` now defaults to `true`. [[Feature #16786]] -* Module + * `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]] - * Modified method +* Kernel - * 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]] + * `Kernel#clone` when called with `freeze: false` keyword will call + `#initialize_clone` with the `freeze: false` keyword. + [[Bug #14266]] - ```ruby - class C; end - module M1; end - module M2; end - C.include M1 - M1.include M2 - p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject] - ``` + * `Kernel#clone` when called with `freeze: true` keyword will call + `#initialize_clone` with the `freeze: true` keyword, and will + return a frozen copy even if the receiver is unfrozen. + [[Feature #16175]] -* Thread + * `Kernel#eval` when called with two arguments will use "(eval)" + for `__FILE__` and 1 for `__LINE__` in the evaluated code. + [[Bug #4352]] - * 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 + * `Kernel#lambda` now warns if called without a literal block. + [[Feature #15973]] + + * `Kernel.sleep(...)` invokes the scheduler hook `#kernel_sleep(...)` 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]] + +* Module + + * `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]] + + ```ruby + class C; end + module M1; end + module M2; end + C.include M1 + M1.include M2 + p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject] + ``` * Mutex @@ -226,39 +234,12 @@ Outstanding ones only. should be compatible for essentially all usages and avoids blocking when 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#==` and `Proc#eql?` are now defined and will return true for separate Proc instances if the procs were created from the same block. [[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#pop`, `SizedQueue#push` and related methods may now invoke the @@ -267,123 +248,128 @@ Outstanding ones only. * 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. -* Symbol +* String - * Modified method + * The following methods now return or yield 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_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` - * Symbol#to_proc now returns a lambda Proc. - [[Feature #16260]] +* Symbol - * New method + * `Symbol#to_proc` now returns a lambda Proc. [[Feature #16260]] - * Symbol#name, which returns the name of the symbol if it is - named. The returned string cannot be modified. - [[Feature #16150]] + * `Symbol#name` has been added, which returns the name of the symbol + if it is named. The returned string is frozen. [[Feature #16150]] -* String +* Thread - * Modified methods - - * The following methods now return or yield 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_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` + * 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]] -* Warning + * `Fiber.blocking?` tells whether the current execution context is + blocking. [[Feature #16786]] - * Modified method + * `Thread#join` invokes the scheduler hooks `block`/`unblock` in a + non-blocking execution context. [[Feature #16786]] - * Warning#warn now supports a category kwarg. - [[Feature #17122]] + * `Thread.ignore_deadlock` accessor for disabling the default deadlock + detection, allowing the use of signal handlers to break deadlock. + [[Bug #13768]] -* GC - * New method +* Warning - * `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]] + * Warning#warn now supports a category keyword argument. + [[Feature #17122]] ## Stdlib updates Outstanding ones only. -* RubyGems - - * Update to RubyGems 3.2.0.rc.1 - * Bundler * Update to Bundler 2.2.0.rc.1 -* Net::HTTP - - * New method +* CSV - * Add Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname - to skip hostname verification. [[Feature #16555]] + * Update to CSV 3.1.9 - * Modified method +* Fiddle - * 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]] + * Update to Fiddle 1.0.2 * IRB * 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 * Initialization no longer lazy [[Bug #12136]] + * Builtin methods can now be overridden safely. [[Bug #15409]] + * Implementation uses only methods ending with `!`. + * Ractor compatible. + * Improved support for YAML [[Bug #8382]] + * Use officially discouraged. Read "Caveats" section. * Reline * Update to Reline 0.1.5 +* RubyGems + + * Update to RubyGems 3.2.0.rc.1 + * Socket * 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) ``` -* Fiddle - - * Update to Fiddle 1.0.2 - -* CSV - - * Update to CSV 3.1.9 - ## Compatibility issues Excluding feature bug fixes. @@ -415,6 +393,7 @@ Excluding feature bug fixes. * Now `{ a: 1 }.each(&->(k, v) { })` raises an ArgumentError due to lambda's arity check. + * This is experimental; if it brings a big incompatibility issue, 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 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 |