Update NEWS with Module#ruby2_keywords and a few other things
This commit is contained in:
parent
6abcd35762
commit
055a85d3d9
32
NEWS
32
NEWS
@ -127,6 +127,13 @@ sufficient information, see the ChangeLog file or Redmine
|
|||||||
* Calling a private method with a literal <code>self</code> as the receiver
|
* Calling a private method with a literal <code>self</code> as the receiver
|
||||||
is now allowed. [Feature #11297] [Feature #16123]
|
is now allowed. [Feature #11297] [Feature #16123]
|
||||||
|
|
||||||
|
* Modifier rescue now operates the same for multiple assignment as single
|
||||||
|
assignment:
|
||||||
|
|
||||||
|
a, b = raise rescue [1, 2]
|
||||||
|
# Previously parsed as: (a, b = raise) rescue [1, 2]
|
||||||
|
# Now parsed as: a, b = (raise rescue [1, 2])
|
||||||
|
|
||||||
=== Core classes updates (outstanding ones only)
|
=== Core classes updates (outstanding ones only)
|
||||||
|
|
||||||
Array::
|
Array::
|
||||||
@ -231,6 +238,11 @@ Module::
|
|||||||
* Added Module#const_source_location to retrieve the location where a
|
* Added Module#const_source_location to retrieve the location where a
|
||||||
constant is defined. [Feature #10771]
|
constant is defined. [Feature #10771]
|
||||||
|
|
||||||
|
* Added Module#ruby2_keywords for marking a method as passing keyword
|
||||||
|
arguments through a regular argument splat, useful when delegating
|
||||||
|
all arguments to another method in a way that can be backwards
|
||||||
|
compatible with older Ruby versions. [Bug #16154]
|
||||||
|
|
||||||
Modified method::
|
Modified method::
|
||||||
|
|
||||||
* Module#autoload? now takes an +inherit+ optional argument, like as
|
* Module#autoload? now takes an +inherit+ optional argument, like as
|
||||||
@ -410,12 +422,28 @@ RubyGems::
|
|||||||
|
|
||||||
=== Stdlib compatibility issues (excluding feature bug fixes)
|
=== Stdlib compatibility issues (excluding feature bug fixes)
|
||||||
|
|
||||||
|
pathname::
|
||||||
|
|
||||||
|
* Kernel#Pathname when called with a Pathname argument now returns
|
||||||
|
the argument instead of creating a new Pathname. This is more
|
||||||
|
similar to other Kernel methods, but can break code that modifies
|
||||||
|
the return value and expects the argument not to be modified.
|
||||||
|
|
||||||
profile.rb, Profiler__::
|
profile.rb, Profiler__::
|
||||||
|
|
||||||
* Removed from standard library. No one maintains it from Ruby 2.0.0.
|
* Removed from standard library. No one maintains it from Ruby 2.0.0.
|
||||||
|
|
||||||
=== C API updates
|
=== C API updates
|
||||||
|
|
||||||
|
* Many <code>*_kw</code> functions have been added for setting whether
|
||||||
|
the final argument being passed should be treated as keywords. You
|
||||||
|
may need to switch to these functions to avoid keyword argument
|
||||||
|
separation warnings, and to ensure correct behavior in Ruby 3.
|
||||||
|
|
||||||
|
* The <code>:</code> character in rb_scan_args format string is now
|
||||||
|
treated as keyword arguments. Passing a positional hash instead of
|
||||||
|
keyword arguments will emit a deprecation warning.
|
||||||
|
|
||||||
* C API declarations with +ANYARGS+ are changed not to use +ANYARGS+
|
* C API declarations with +ANYARGS+ are changed not to use +ANYARGS+
|
||||||
https://github.com/ruby/ruby/pull/2404
|
https://github.com/ruby/ruby/pull/2404
|
||||||
|
|
||||||
@ -434,6 +462,10 @@ Fiber::
|
|||||||
becomes O(log N) and fiber creation is amortized O(1). Around 10x
|
becomes O(log N) and fiber creation is amortized O(1). Around 10x
|
||||||
performance improvement was measured in micro-benchmarks.
|
performance improvement was measured in micro-benchmarks.
|
||||||
|
|
||||||
|
File::
|
||||||
|
* File.realpath now uses realpath(3) on many platforms, which can
|
||||||
|
significantly improve performance.
|
||||||
|
|
||||||
Thread::
|
Thread::
|
||||||
|
|
||||||
* VM stack memory allocation is now combined with native thread stack,
|
* VM stack memory allocation is now combined with native thread stack,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user