summaryrefslogtreecommitdiff
path: root/doc/extension.rdoc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-04 08:50:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-04 08:50:28 +0000
commitb62e32201727907e465edeb1f18b72544d7c2889 (patch)
tree822eda69ecd61630114c2765cd4e003dfcc9d43f /doc/extension.rdoc
parentb16d1968e6376c0622093d0830c50272c929d63f (diff)
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/trunk@56980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/extension.rdoc')
-rw-r--r--doc/extension.rdoc7
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index 42a445602b..ba6319afc6 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -1431,10 +1431,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+.
Be warned, handling keyword arguments in the C API is less efficient
than handling them in Ruby. Consider using a Ruby wrapper method