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:
Jeremy Evans 2020-06-01 15:18:50 -07:00
Родитель cadd2245f7
Коммит d2c48705ae
1 изменённых файлов: 0 добавлений и 26 удалений

Просмотреть файл

@ -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.