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 [ruby/benchmark] Add comment about terminating newline in captions; fix test method name. 2021-04-22 11:51:37 +09:00
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 [ruby/digest] Use pend instead of skip 2021-07-28 11:48:36 +09:00
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 Fix leaked file descriptor in passwd test 2021-03-24 13:02:54 +09:00
excludes Stop stale tests [Bug #9718] 2021-09-02 01:39:01 +09:00
fiber Improve interface for get/set/copy. 2021-12-21 12:25:42 +13:00
fiddle [ruby/fiddle] Use test-unit gem (https://github.com/ruby/fiddle/pull/69) 2021-09-05 17:43:48 +09:00
fileutils Use Test::Unit::AssertionFailedError instead of MiniTest::Assertion for test-unit migration 2021-09-06 18:34:15 +09:00
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 Revert "mkmf.rb: try linking at try_var" [Bug #18235] 2021-10-03 18:23:39 +09:00
monitor Distinguish signal and timeout [Bug #16608] 2021-07-25 13:09:03 -07:00
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 Guard for the ftp protocol feature of OpenURI 2021-05-27 14:42:11 +09:00
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 [ruby/pathname] Prefer omit over skip 2021-09-07 13:02:56 +09:00
psych test/psych/test_scalar_scanner.rb: Prevent a warning 2021-09-09 23:35:03 +09:00
racc [ruby/racc] Prefer __dir__ over File.dirname(__FILE__) 2021-09-15 16:20:18 +09:00
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 Removed minitest/mock 2021-05-19 14:24:01 +09:00
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 [ruby/stringio] Check if closed in loop 2021-03-08 10:13:29 +09:00
strscan [ruby/strscan] Fix segmentation fault of `StringScanner#charpos` when `String#byteslice` returns non string value [Bug #17756] (#20) 2021-05-06 16:20:38 +09:00
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 Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
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 Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
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 [ruby/set] Allow Set#intersect? and #disjoint? to accept array argument 2021-07-29 14:18:10 +09:00
test_shellwords.rb
test_singleton.rb
test_sorted_set.rb
test_syslog.rb
test_tempfile.rb
test_time.rb Separate test used by test_ractor for Ractor in test_time.rb 2021-04-22 13:35:30 +09:00
test_timeout.rb [ruby/timeout] test that yield is given number of seconds 2021-09-28 06:05:50 +09:00
test_tmpdir.rb [ruby/tmpdir] Make usable chars more strict 2021-04-05 21:08:57 +09:00
test_trick.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb