diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-07 18:49:49 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-07 18:49:49 +0000 |
commit | 6c419f12d042294701a889e1069f57d7703af4e2 (patch) | |
tree | 193c3ecd1a8b4db05f850e926c94b35fc67cdb9f | |
parent | 096e9bc6367a4a8ce2d2ba833f30432d28bf0d44 (diff) | |
download | ruby-6c419f12d042294701a889e1069f57d7703af4e2.tar.gz |
doc/extension.rdoc: warn about kwargs performance in C [ci skip]
This existing API seems doomed performance-wise, and writing
things in Ruby is nicer anyways. So discourage folks from
using it.
[Feature #11339]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/extension.rdoc | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Dec 8 03:45:47 2015 Eric Wong <e@80x24.org> + + * doc/extension.rdoc: warn about kwargs performance in C + [Feature #11339] [ci skip] + Tue Dec 8 03:44:51 2015 Koichi Sasada <ko1@atdot.net> * iseq.c (iseq_load): disable peephole optimization option diff --git a/doc/extension.rdoc b/doc/extension.rdoc index 00e789f585..40c68e8be0 100644 --- a/doc/extension.rdoc +++ b/doc/extension.rdoc @@ -1412,6 +1412,11 @@ int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optiona next to optional +values+ as a new Hash, 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 + around a non-keyword C function. + ref: https://bugs.ruby-lang.org/issues/11339 + VALUE rb_extract_keywords(VALUE *original_hash) Extracts pairs whose key is a symbol into a new hash from a hash |