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

ruby-changes:58158

From: Jeremy <ko1@a...>
Date: Tue, 8 Oct 2019 05:53:00 +0900 (JST)
Subject: [ruby-changes:58158] c0eae130b1 (master): Note RB_PASS_EMPTY_KEYWORDS and RB_SCAN_ARGS_EMPTY_KEYWORDS will be removed

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

From c0eae130b1d9fde5716c2340141d78ebc48c82a5 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Mon, 7 Oct 2019 13:16:33 -0700
Subject: Note RB_PASS_EMPTY_KEYWORDS and RB_SCAN_ARGS_EMPTY_KEYWORDS will be
 removed

There is no need for these in Ruby 3.0, and the plan is to
remove them.

diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index 8162c5e..7807f98 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -468,6 +468,7 @@ To specify whether keyword arguments are passed when calling super: https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc#L468
 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
 
@@ -1483,6 +1484,7 @@ rb_scan_args_kw(int kw_splat, int argc, VALUE *argv, const char *fmt, ...) :: https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc#L1484
   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.
 
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 2ec0cc8..734cc93 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1903,7 +1903,7 @@ VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1903
 int rb_scan_args(int, const VALUE*, const char*, ...);
 #define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0
 #define RB_SCAN_ARGS_KEYWORDS 1
-#define RB_SCAN_ARGS_EMPTY_KEYWORDS 2
+#define RB_SCAN_ARGS_EMPTY_KEYWORDS 2 /* Will be removed in 3.0 */
 #define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3
 int rb_scan_args_kw(int, int, const VALUE*, const char*, ...);
 VALUE rb_call_super(int, const VALUE*);
@@ -1978,7 +1978,7 @@ VALUE rb_yield_splat_kw(VALUE, int); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1978
 VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)); /* rb_block_call_func */
 #define RB_NO_KEYWORDS 0
 #define RB_PASS_KEYWORDS 1
-#define RB_PASS_EMPTY_KEYWORDS 2
+#define RB_PASS_EMPTY_KEYWORDS 2 /* Will be removed in 3.0 */
 #define RB_PASS_CALLED_KEYWORDS 3
 int rb_keyword_given_p(void);
 int rb_block_given_p(void);
-- 
cgit v0.10.2


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

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