[前][次][番号順一覧][スレッド一覧]

ruby-changes:58157

From: Jeremy <ko1@a...>
Date: Tue, 8 Oct 2019 04:58:40 +0900 (JST)
Subject: [ruby-changes:58157] 055a85d3d9 (master): Update NEWS with Module#ruby2_keywords and a few other things

https://git.ruby-lang.org/ruby.git/commit/?id=055a85d3d9

From 055a85d3d9ab5850b1269089f28385158d969d18 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Mon, 7 Oct 2019 12:55:22 -0700
Subject: Update NEWS with Module#ruby2_keywords and a few other things


diff --git a/NEWS b/NEWS
index d4e7e02..7bc0f35 100644
--- a/NEWS
+++ b/NEWS
@@ -127,6 +127,13 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L127
 * 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:: https://github.com/ruby/ruby/blob/trunk/NEWS#L238
     * 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:: https://github.com/ruby/ruby/blob/trunk/NEWS#L422
 
 === 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:: https://github.com/ruby/ruby/blob/trunk/NEWS#L462
     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 v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]