1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ruby
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
..
enc Use omit instead of skip: test/ruby/enc/**/*.rb 2021-12-29 19:27:58 +09:00
allpairs.rb
beginmainend.rb
bug-11928.rb
bug-13526.rb
lbtest.rb
marshaltestlib.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
sentence.rb
test_alias.rb
test_argf.rb Assert for duplicated ARGF [Bug #18074] 2021-08-10 23:40:45 +09:00
test_arithmetic_sequence.rb test/ruby/test_arithmetic_sequence.rb: restore test_last_bug17218 2020-12-10 00:59:00 +09:00
test_arity.rb
test_array.rb Refined test [Bug #18140] 2021-09-02 09:11:41 +09:00
test_assignment.rb test/ruby/test_assignment.rb: Avoid "assigned but unused variable" 2021-04-23 22:11:01 +09:00
test_ast.rb Make RubyVM::AST.of work with code written in -e command-line option 2021-12-26 20:57:34 +09:00
test_autoload.rb Remove autoload for constant if the autoload fails 2021-10-08 14:54:26 -07:00
test_backtrace.rb Make backtrace generation work outward from current frame 2021-08-06 10:15:01 -07:00
test_basicinstructions.rb
test_beginendblock.rb
test_bignum.rb Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
test_call.rb
test_case.rb Avoid improper optimization of case statements mixed integer/rational/complex 2021-05-12 19:30:05 -07:00
test_class.rb Remove Class#descendants 2021-12-20 11:02:15 -08:00
test_clone.rb
test_comparable.rb
test_complex.rb
test_complex2.rb
test_complexrational.rb
test_condition.rb
test_const.rb
test_continuation.rb
test_default_gems.rb
test_defined.rb Add more tests for defined? with method calls 2021-03-29 07:45:15 -07:00
test_dir.rb Expect bool as sort: option at glob [Feature #18287] 2021-11-18 21:47:18 +09:00
test_dir_m17n.rb win32: Use UTF-8 as filesystem encoding [Feature #12654] 2020-12-20 18:34:04 +09:00
test_econv.rb Fix some typos by spell checker 2021-04-26 10:07:41 +09:00
test_encoding.rb Fix a failure 2021-02-16 18:17:09 +09:00
test_enum.rb Make Enumerable#each_cons return object if over size 2021-11-16 19:31:35 -08:00
test_enumerator.rb Use capture_output instead of capture_io 2021-09-13 21:14:42 +09:00
test_env.rb ENV ivars should not be accessible from ractors 2021-12-17 15:46:50 +09:00
test_eval.rb Lazily create singletons on instance_{exec,eval} (#5146) 2021-12-02 15:53:39 -08:00
test_exception.rb Removed deprecated Dir.exists? and File.exists? 2021-12-28 18:36:30 +09:00
test_fiber.rb Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
test_file.rb
test_file_exhaustive.rb Apply the timeout scale to also separated workers 2021-10-30 12:26:06 +09:00
test_fixnum.rb test/ruby: Check warning messages at a finer granularity 2020-12-17 20:06:18 +09:00
test_flip.rb
test_float.rb Attempt to fix floating point test failure 2021-05-29 14:08:24 -07:00
test_fnmatch.rb
test_frozen_error.rb
test_gc.rb Revert "Add GC.stat_size_pool to get stats for a size pool" 2021-11-25 11:01:50 -05:00
test_gc_compact.rb Send the message for s390x to stderr [ci skip] 2021-12-17 11:28:06 +09:00
test_hash.rb Add documentation and tests for keyword argument value omission 2021-09-11 20:23:36 +09:00
test_ifunless.rb
test_inlinecache.rb
test_insns_leaf.rb [Bug #17880] Set leaf false on opt_setinlinecache (#4565) 2021-06-14 17:34:57 -07:00
test_integer.rb Don't call + and < in Integer.times for !FIXNUM 2021-12-01 16:21:50 -08:00
test_integer_comb.rb
test_io.rb Empty and return the buffer if zero size is given [Bug #18421] 2021-12-22 15:45:59 +09:00
test_io_buffer.rb Add fiber scheduler hooks for pread/pwrite, and add support to IO::Buffer. 2021-12-23 12:20:09 +13:00
test_io_m17n.rb Check encoding name to replicate 2020-10-15 16:48:25 +09:00
test_iseq.rb Add support for anonymous rest and keyword rest argument forwarding 2021-12-30 14:37:42 -08:00
test_iterator.rb
test_jit.rb Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
test_jit_debug.rb Rename --jit to --mjit (#5248) 2021-12-13 16:08:01 -08:00
test_key_error.rb
test_keyword.rb Adds mixed hash value and value omission tests 2021-09-13 13:54:03 +09:00
test_lambda.rb test/ruby/test_lambda.rb: Remove "warning: assigned but unused variable" 2021-04-04 15:26:09 +09:00
test_lazy_enumerator.rb Fix lazy enumerator with index size 2021-05-27 14:17:32 -07:00
test_literal.rb Use to_s and puts in tests 2021-12-16 15:12:12 +09:00
test_m17n.rb test/ruby/test_m17n.rb: skip a test that breaks another test 2021-11-15 16:53:49 +09:00
test_m17n_comb.rb Add test for String#casecmp? 2021-01-24 15:57:13 +09:00
test_marshal.rb test/ruby/test_marshal.rb: Prevent "assigned but unused variable" warning 2021-10-25 20:43:42 +09:00
test_math.rb Add domain check macros 2021-07-04 22:15:59 +09:00
test_memory_view.rb [memory_view][fiddle] Rename len to byte_size in rb_memory_view_t 2020-12-23 09:24:53 +09:00
test_metaclass.rb
test_method.rb Add support for anonymous rest and keyword rest argument forwarding 2021-12-30 14:37:42 -08:00
test_method_cache.rb invalidate negative cache any time. 2021-02-19 16:54:31 +09:00
test_mixed_unicode_escapes.rb
test_module.rb Make Module#{public,private,protected,module_function} return arguments 2021-11-18 09:47:40 -08:00
test_name_error.rb Prevent "warning: ambiguity between regexp and two divisions" 2021-06-30 13:41:18 +09:00
test_nomethod_error.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
test_not.rb
test_numeric.rb Use Rational for Float#round with ndigits > 14 2021-08-06 15:03:51 -07:00
test_object.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
test_objectspace.rb Fix typos 2021-11-02 19:17:37 +09:00
test_optimization.rb Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
test_pack.rb Add a test for bug 18343 2021-11-16 19:28:45 -08:00
test_parse.rb Anonymous block forwarding allows a method to forward a passed 2021-11-18 14:17:57 -08:00
test_path.rb
test_pattern_matching.rb Disable did_you_mean in TestPatternMatching 2021-10-22 21:22:14 -04:00
test_pipe.rb
test_primitive.rb
test_proc.rb Add support for anonymous rest and keyword rest argument forwarding 2021-12-30 14:37:42 -08:00
test_process.rb Use to_s and puts in tests 2021-12-16 15:12:12 +09:00
test_rand.rb Deprecate Random::DEFAULT 2020-12-14 20:29:50 +01:00
test_random_formatter.rb [ruby/securerandom] Use String#unpack1 2021-12-14 11:59:22 +09:00
test_range.rb numeric.c, range.c: prohibit zero step 2020-10-23 15:26:51 +09:00
test_rational.rb test_cdhash: refactor change class 2021-05-12 10:30:46 +09:00
test_rational2.rb
test_readpartial.rb
test_refinement.rb Remove Refinement#include and Refinement#prepend 2021-12-26 23:28:54 +09:00
test_regexp.rb Avoid race condition in Regexp#match 2021-10-01 19:50:19 -09:00
test_require.rb Allow Kernel#load to load code into a specified module 2021-11-17 22:43:40 -08:00
test_require_lib.rb RSS library is the bundled gems now 2021-05-26 11:39:01 +09:00
test_rubyoptions.rb Fix test_rubyoptions for MinGW (#5363) 2021-12-27 22:22:09 -08:00
test_rubyvm.rb test/ruby/test_rubyvm.rb: prevent "assigned but unused variable" warnings 2021-10-25 20:45:05 +09:00
test_rubyvm_jit.rb Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
test_settracefunc.rb Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
test_signal.rb
test_sleep.rb
test_sprintf.rb [Feature #18290] Remove tests that test use of rb_gc_force_recycle 2021-11-08 15:39:53 -05:00
test_sprintf_comb.rb
test_stack.rb Pass ASAN options to child environments 2020-09-28 09:45:04 -07:00
test_string.rb Add tests for the edge caces of String#end_with? 2021-10-08 14:08:03 +09:00
test_stringchar.rb
test_struct.rb Initialize Struct by calling with keyword arguments 2021-12-26 23:28:54 +09:00
test_super.rb Add tests for cme NULL crash 2021-11-17 13:20:31 -05:00
test_symbol.rb
test_syntax.rb Add support for anonymous rest and keyword rest argument forwarding 2021-12-30 14:37:42 -08:00
test_system.rb
test_thread.rb Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
test_thread_cv.rb Reap rarely leaked threads 2021-10-14 22:57:45 +09:00
test_thread_queue.rb Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
test_threadgroup.rb
test_time.rb Raise proper exception when month argument is not a name 2021-12-25 18:03:50 +09:00
test_time_tz.rb Parse "-00:00" as UTC for the round-trip [Feature #17544] 2021-02-16 20:34:23 +09:00
test_trace.rb
test_transcode.rb - add regression tests for U+6E7F (湿) in ISO-2022-JP 2021-07-01 17:33:43 +09:00
test_undef.rb Lazily create singletons on instance_{exec,eval} (#5146) 2021-12-02 15:53:39 -08:00
test_unicode_escape.rb
test_variable.rb Remove cvar overtaken classes at end of test methods 2021-03-10 12:09:45 -08:00
test_vm_dump.rb
test_weakmap.rb ObjectSpace::WeakMap#inspect: check if living object [Bug #18392] 2021-12-07 21:55:41 +09:00
test_whileuntil.rb
test_yield.rb
test_yjit.rb Fix test_rubyoptions for MinGW (#5363) 2021-12-27 22:22:09 -08:00
ut_eof.rb