1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/-test-
Jeremy Evans beae6cbf0f Fully separate positional arguments and keyword arguments
This removes the warnings added in 2.7, and changes the behavior
so that a final positional hash is not treated as keywords or
vice-versa.

To handle the arg_setup_block splat case correctly with keyword
arguments, we need to check if we are taking a keyword hash.
That case didn't have a test, but it affects real-world code,
so add a test for it.

This removes rb_empty_keyword_given_p() and related code, as
that is not needed in Ruby 3.  The empty keyword case is the
same as the no keyword case in Ruby 3.

This changes rb_scan_args to implement keyword argument
separation for C functions when the : character is used.
For backwards compatibility, it returns a duped hash.
This is a bad idea for performance, but not duping the hash
breaks at least Enumerator::ArithmeticSequence#inspect.

Instead of having RB_PASS_CALLED_KEYWORDS be a number,
simplify the code by just making it be rb_keyword_given_p().
2020-01-02 18:40:45 -08:00
..
arith_seq/extract Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
array/resize Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
bignum update dependencies 2019-12-26 20:45:12 +09:00
bug-3571 fix arity of bug_start 2019-08-29 18:34:09 +09:00
bug-5832 Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
bug-14834 ext/-test-/bug-14834/bug-14384.c: fallback for MAYBE_UNUSED 2019-08-01 21:09:59 +09:00
bug_reporter Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
class Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
cxxanyargs Check -1 arity for C++ 2019-11-22 18:42:49 +09:00
debug Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
dln/empty
enumerator_kw Remove unneeded exec bits from some files 2019-11-09 21:36:30 +09:00
exception Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
fatal Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
file atime may not updated unless strictatime is set on macOS Catalina 2019-10-12 14:58:55 +09:00
float Revert the line for nextafter.c for FreeBSD make 2019-11-20 15:37:05 +09:00
funcall Add three more C-API functions for handling keywords 2019-09-29 18:31:08 -07:00
gvl/call_without_gvl Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
hash Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
integer update dependencies 2019-12-26 20:45:12 +09:00
iseq_load Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
iter Fix more keyword separation issues 2019-09-26 19:24:58 -07:00
load Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
marshal Warn instance variable E 2019-08-10 13:18:41 +09:00
memory_status Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
method Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
notimplement Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
num2int Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
path_to_class Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
popen_deadlock Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
postponed_job check interrupts at each frame pop timing. 2019-11-29 17:47:02 +09:00
printf Update dependencies 2019-11-18 23:16:22 +09:00
proc Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
rational update dependencies 2019-12-26 20:45:12 +09:00
rb_call_super_kw Remove unneeded exec bits from some files 2019-11-09 21:36:30 +09:00
recursion Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
regexp Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
scan_args Fully separate positional arguments and keyword arguments 2020-01-02 18:40:45 -08:00
st st_foreach now free from ANYARGS 2019-08-27 15:52:26 +09:00
string update dependencies 2019-12-26 20:45:12 +09:00
struct Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
symbol DEBUG: cxxanyargs 2019-09-19 10:46:52 +09:00
thread_fd_close Update dependencies 2019-11-18 23:16:22 +09:00
time update dependencies 2019-12-26 20:45:12 +09:00
tracepoint rb_ensure now free from ANYARGS 2019-08-27 15:52:26 +09:00
typeddata Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
vm Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
wait_for_single_fd Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
win32
auto_ext.rb