summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-06-01 15:18:50 -0700
committerJeremy Evans <code@jeremyevans.net>2020-06-01 15:18:50 -0700
commitd2c48705ae7c8aa1efdc44327b5cf7c04829cfb3 (patch)
tree6e5d9a7c7efdaf8fd94ed04274e23d87fa7a9a1e /doc
parentcadd2245f7f10850e0b11e5b678b2049399a2d3e (diff)
Update extension.rdoc for Ruby 3 keyword argument separation [ci skip]
This removes the discussion of behavior removed in Ruby 3.
Diffstat (limited to 'doc')
-rw-r--r--doc/extension.rdoc26
1 files changed, 0 insertions, 26 deletions
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.