mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update extension.rdoc for Ruby 3 keyword argument separation [ci skip]
This removes the discussion of behavior removed in Ruby 3.
This commit is contained in:
parent
cadd2245f7
commit
d2c48705ae
1 changed files with 0 additions and 26 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue