1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
Jeremy Evans f53dfab95c Add support for anonymous rest and keyword rest argument forwarding
This allows for the following syntax:

```ruby
def foo(*)
  bar(*)
end
def baz(**)
  quux(**)
end
```

This is a natural addition after the introduction of anonymous
block forwarding.  Anonymous rest and keyword rest arguments were
already supported in method parameters, this just allows them to
be used as arguments to other methods.  The same advantages of
anonymous block forwarding apply to rest and keyword rest argument
forwarding.

This has some minor changes to #parameters output.  Now, instead
of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`.
These were already used for `...` forwarding, so I think it makes
it more consistent to include them in other cases.  If we want to
use `[:rest], [:keyrest]` in both cases, that is also possible.

I don't think the previous behavior of `[:rest], [:keyrest]` in
the non-... case and `[:rest, :*], [:keyrest, :**]` in the ...
case makes sense, but if we did want that behavior, we'll have to
make more substantial changes, such as using a different ID in the
... forwarding case.

Implements [Feature #18351]
2021-12-30 14:37:42 -08:00
..
-ext- Use omit instead of skip: test/-ext-/**/*.rb 2021-12-28 21:13:39 +09:00
base64
benchmark
bigdecimal [ruby/bigdecimal] Fix the result precision of BigDecimal#divmod 2021-12-24 02:29:01 +09:00
cgi [ruby/cgi] Check integer overflow in long range 2021-12-12 13:05:15 +09:00
coverage Make Coverage suspendable (#4856) 2021-10-25 20:00:51 +09:00
csv [ruby/csv] test: reduce size for stability on GitHub Actions 2021-12-24 14:35:33 +09:00
date [ruby/date] check_limit: also handle symbols 2021-11-16 22:51:41 +09:00
did_you_mean Sync did_you_mean 2021-12-24 23:20:30 +09:00
digest
drb Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
dtrace
erb
error_highlight [ruby/error_highlight] Make the formatter mechanism support Ractor 2021-10-27 11:29:20 +09:00
etc
excludes
fiber Improve interface for get/set/copy. 2021-12-21 12:25:42 +13:00
fiddle
fileutils
fixtures/fake_sorted_set_gem
io Sync io-console gem. 2021-12-29 13:27:40 +13:00
irb [ruby/irb] Check colorize option correctly to clear char attr and don't use it for tests 2021-12-21 15:50:32 +09:00
json
lib Fix test_rubyoptions for MinGW (#5363) 2021-12-27 22:22:09 -08:00
logger [ruby/logger] Removed loading old helper file and load Logger class by itself 2021-12-18 08:38:58 +09:00
mkmf
monitor
net Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
nkf
objspace [Feature #18239] Implement VWA for strings 2021-10-25 13:26:23 -04:00
open-uri
openssl [ruby/openssl] Add tast cases to OpenSSL::BN using ractor 2021-12-25 03:31:59 +09:00
optparse Revert "Revert "Replace an deprecated constant with a new one in did_you_mean"" 2021-12-24 23:21:55 +09:00
ostruct [ruby/ostruct] Alias less methods 2021-12-06 23:21:07 -05:00
pathname
psych
racc
rdoc [ruby/rdoc] Support addition Object class when adding methods to top level 2021-12-09 18:16:06 +09:00
readline Increase wait time 2021-12-25 00:20:53 +09:00
reline [ruby/reline] Omit a test on Ruby 2.6 2021-12-30 20:52:06 +09:00
resolv
rinda Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
ripper ripper: refine test to show expected states 2021-12-14 20:06:51 +09:00
ruby Add support for anonymous rest and keyword rest argument forwarding 2021-12-30 14:37:42 -08:00
rubygems [rubygems/rubygems] Don't crash when updating to an unsupported rubygems-update version 2021-12-27 22:57:46 +09:00
socket Use omit instead of skip: test/socket/**/*.rb 2021-12-28 20:29:54 +09:00
stringio
strscan
syslog
uri 'uri/https' is needed 2021-10-22 23:56:07 +09:00
win32ole [ruby/win32ole] Undefine allocator of WIN32OLE_VARIABLE to get rid of warning 2021-12-30 21:13:11 +09:00
yaml
zlib [ruby/zlib] [Bug #18358] Fix crash in zlib when in progress 2021-11-24 23:01:41 +09:00
runner.rb Disable experimental warnings in test/runner.rb 2021-11-10 17:42:09 +09:00
test_abbrev.rb
test_delegate.rb
test_extlibs.rb
test_find.rb
test_forwardable.rb
test_getoptlong.rb [ruby/getoptlong] fixup 5f57f47572502173e2e8880f83ef7b3e2659f974 2021-11-11 14:00:32 +09:00
test_ipaddr.rb [ruby/ipaddr] Make IPAddr#include? consider range of argument 2021-10-11 13:50:54 +09:00
test_mutex_m.rb
test_observer.rb
test_open3.rb [ruby/open3] Use RbConfig's 'host_os' 2021-12-09 19:28:54 +09:00
test_pp.rb [ruby/pp] Add context to bind_call and skip 2.7+ test 2021-12-18 08:38:59 +09:00
test_prettyprint.rb
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb [ruby/securerandom] Split Random::Formatter from SecureRandom [Feature #18190] 2021-12-09 20:26:44 +09:00
test_set.rb
test_shellwords.rb
test_singleton.rb
test_sorted_set.rb
test_syslog.rb
test_tempfile.rb
test_time.rb
test_timeout.rb
test_tmpdir.rb
test_trick.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb