From 055a85d3d9ab5850b1269089f28385158d969d18 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Mon, 7 Oct 2019 12:55:22 -0700 Subject: Update NEWS with Module#ruby2_keywords and a few other things --- NEWS | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index d4e7e02710..7bc0f35923 100644 --- a/NEWS +++ b/NEWS @@ -127,6 +127,13 @@ sufficient information, see the ChangeLog file or Redmine * Calling a private method with a literal self as the receiver 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) Array:: @@ -231,6 +238,11 @@ Module:: * Added Module#const_source_location to retrieve the location where a 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:: * Module#autoload? now takes an +inherit+ optional argument, like as @@ -410,12 +422,28 @@ RubyGems:: === 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__:: * Removed from standard library. No one maintains it from Ruby 2.0.0. === C API updates +* Many *_kw 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 : 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+ 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 performance improvement was measured in micro-benchmarks. +File:: + * File.realpath now uses realpath(3) on many platforms, which can + significantly improve performance. + Thread:: * VM stack memory allocation is now combined with native thread stack, -- cgit v1.2.3