diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-27 10:41:16 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-27 10:41:16 +0000 |
commit | ed8c211a645cfb0528128306789d73441afadf31 (patch) | |
tree | 5c2fbd9fcb1fd3aaa9aecc98263ebd1bd26b888d /README.EXT | |
parent | 3aed194ac3edba9249b34fce09de36fa76326cbc (diff) |
merge revision(s) 56980,56981: [Backport #13004]
extension.rdoc: fix rb_get_kwargs [ci skip]
* doc/extension.rdoc: [DOC] optional keyword arguments are
defaulted to Qundef. ignored keys are kept in the hash but a
new Hash is not created. [ruby-dev:49893] [Bug #13004]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
-rw-r--r-- | README.EXT | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/README.EXT b/README.EXT index 3e010c3002..29cfbc27e9 100644 --- a/README.EXT +++ b/README.EXT @@ -1314,10 +1314,9 @@ int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optiona +optional+ is negative) number of IDs are optional. If a mandatory key is not contained in +keyword_hash+, raises "missing keyword" +ArgumentError+. If an optional key is not present in - +keyword_hash+, the corresponding element in +values+ is not changed. - If +optional+ is negative, rest of +keyword_hash+ are stored in the - next to optional +values+ as a new Hash, otherwise raises "unknown - keyword" +ArgumentError+. + +keyword_hash+, the corresponding element in +values+ is set to +Qundef+. + If +optional+ is negative, rest of +keyword_hash+ are ignored, otherwise + raises "unknown keyword" +ArgumentError+. VALUE rb_extract_keywords(VALUE *original_hash) |