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

ruby-changes:61446

From: Jeremy <ko1@a...>
Date: Tue, 2 Jun 2020 07:21:21 +0900 (JST)
Subject: [ruby-changes:61446] d2c48705ae (master): Update extension.rdoc for Ruby 3 keyword argument separation [ci skip]

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

From d2c48705ae7c8aa1efdc44327b5cf7c04829cfb3 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Mon, 1 Jun 2020 15:18:50 -0700
Subject: Update extension.rdoc for Ruby 3 keyword argument separation [ci
 skip]

This removes the discussion of behavior removed in Ruby 3.

diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index fd91a54..e55de34 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -457,8 +457,6 @@ To specify whether keyword arguments are passed when calling super: https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc#L457
 
 RB_NO_KEYWORDS :: Do not pass keywords
 RB_PASS_KEYWORDS :: Pass keywords, final argument should be a hash of keywords
-RB_PASS_EMPTY_KEYWORDS :: Pass empty keywords (not included in arguments)
-                          (this will be removed in Ruby 3.0)
 RB_PASS_CALLED_KEYWORDS :: Pass keywords if current method was called with
                            keywords, useful for argument delegation
 
@@ -1423,28 +1421,6 @@ rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) :: https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc#L1421
                                             ; argument captured as a hash.
                                             ; If keyword arguments are not
                                             ; provided, returns nil.
-                                            ;
-                                            ; Currently, will also consider
-                                            ; final argument as keywords if
-                                            ; it is a hash or can be
-                                            ; converted to a hash with
-                                            ; #to_hash.  When the last
-                                            ; argument is nil, it is
-                                            ; captured if it is not
-                                            ; ambiguous to take it as
-                                            ; empty option hash; i.e. '*'
-                                            ; is not specified and
-                                            ; arguments are given more
-                                            ; than sufficient.
-                                            ;
-                                            ; However, handling final
-                                            ; argument as keywords if
-                                            ; method was not called with
-                                            ; keywords (whether final
-                                            ; argument is hash or nil) is
-                                            ; deprecated. In that case, a
-                                            ; warning will be emitted, and
-                                            ; in Ruby 3.0 it will be an error.
     sym-for-block-arg              := "&"   ; Indicates that an iterator
                                             ; block should be captured if
                                             ; given
@@ -1469,8 +1445,6 @@ rb_scan_args_kw(int kw_splat, int argc, VALUE *argv, const char *fmt, ...) :: https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc#L1445
   RB_SCAN_ARGS_PASS_CALLED_KEYWORDS :: Same behavior as +rb_scan_args+.
   RB_SCAN_ARGS_KEYWORDS :: The final argument should be a hash treated as
                            keywords.
-  RB_SCAN_ARGS_EMPTY_KEYWORDS :: Don't treat a final hash as keywords.
-                                 (this will be removed in Ruby 3.0)
   RB_SCAN_ARGS_LAST_HASH_KEYWORDS :: Treat a final argument as keywords if it
                                      is a hash, and not as keywords otherwise.
 
-- 
cgit v0.10.2


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

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