summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-10-07 12:55:22 -0700
committerJeremy Evans <code@jeremyevans.net>2019-10-07 12:56:52 -0700
commit055a85d3d9ab5850b1269089f28385158d969d18 (patch)
tree934540f1edb4ff90fc9425c01f97102267f4470a /NEWS
parent6abcd35762db4bf49cd6c62a8c624e2a013e5dc1 (diff)
Update NEWS with Module#ruby2_keywords and a few other things
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS32
1 files changed, 32 insertions, 0 deletions
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 <code>self</code> 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 <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+
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,