From d2c48705ae7c8aa1efdc44327b5cf7c04829cfb3 Mon Sep 17 00:00:00 2001 From: Jeremy Evans 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. --- doc/extension.rdoc | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'doc') diff --git a/doc/extension.rdoc b/doc/extension.rdoc index fd91a54ebf..e55de34355 100644 --- a/doc/extension.rdoc +++ b/doc/extension.rdoc @@ -457,8 +457,6 @@ To specify whether keyword arguments are passed when calling super: 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, ...) :: ; 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, ...) :: 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 v1.2.3