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 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
..
enc Removed excess spaces 2019-06-28 16:02:47 +09:00
allpairs.rb
beginmainend.rb
bug-11928.rb
bug-13526.rb
lbtest.rb
marshaltestlib.rb
sentence.rb Fixed misspellings 2019-12-20 09:32:42 +09:00
test_alias.rb Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
test_argf.rb
test_arithmetic_sequence.rb
test_arity.rb
test_array.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_assignment.rb Fixed misspellings 2019-12-20 09:32:42 +09:00
test_ast.rb Revert "Method reference operator" 2019-11-12 17:24:48 +09:00
test_autoload.rb Do not load files in build directory 2019-12-11 12:35:51 +09:00
test_backtrace.rb
test_basicinstructions.rb
test_beginendblock.rb
test_bignum.rb Removed unused variables 2019-06-30 08:45:01 +09:00
test_call.rb
test_case.rb
test_class.rb Prohibit calling undefined allocator [Bug #16297] 2019-11-06 11:17:09 +09:00
test_clone.rb
test_comparable.rb Raise on end-exclusive ranges [Feature #14784] 2019-10-26 12:52:50 +09:00
test_complex.rb Make Kernel#{Pathname,BigDecimal,Complex} return argument if given correct type 2019-09-21 16:10:37 -07:00
test_complex2.rb
test_complexrational.rb Implement Complex#<=> 2019-06-19 10:50:58 -07:00
test_condition.rb
test_const.rb Avoid top-level search for nested constant reference from nil in defined? 2019-11-13 15:36:58 +09:00
test_continuation.rb
test_default_gems.rb Skip test_validate_gemspec when tarball and git installed too 2019-11-23 01:57:19 +09:00
test_defined.rb
test_dir.rb Make test-all and test-spec runnable on Android 2019-09-09 20:24:03 +09:00
test_dir_m17n.rb Make rb_scan_args handle keywords more similar to Ruby methods (#2460) 2019-09-25 11:18:49 -07:00
test_econv.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_encoding.rb Fixed stack overflow [Bug #16382] 2019-12-03 08:51:50 +09:00
test_enum.rb Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867] [Bug #16354] 2019-11-19 15:35:14 -06:00
test_enumerator.rb Make Enumerator::Chain#each treat lambdas as lambda 2019-12-03 23:18:28 +02:00
test_env.rb Relax test strictness for error message from KeyError 2019-11-30 23:26:09 -05:00
test_eval.rb Fix dangling path name from fstring 2019-08-03 13:48:29 +09:00
test_exception.rb Split test_nomethod_error.rb 2019-12-31 19:43:36 +09:00
test_fiber.rb Suspend many fibers test on JIT for now 2019-11-13 09:38:22 -08:00
test_file.rb Use a temporary file for chown test 2019-12-18 13:35:58 +09:00
test_file_exhaustive.rb Revert "Should return "." for File.extname("file.") also on Windows" 2019-12-23 11:54:25 +09:00
test_fixnum.rb
test_flip.rb Revert "Remove warnings of flip-flop deprecation from tests and specs" 2019-08-29 11:10:45 +09:00
test_float.rb test/ruby/test_float.rb: suppress an overflow warning 2019-07-31 14:35:54 +09:00
test_fnmatch.rb Fix for wrong fnmatch patttern 2019-10-01 19:19:56 +09:00
test_frozen_error.rb Split test_frozen_error.rb 2019-12-31 19:43:36 +09:00
test_gc.rb Fix passing actual object_id to finalizer 2019-11-08 12:41:05 -08:00
test_gc_compact.rb Add a counter for compaction 2019-11-07 12:46:14 -08:00
test_hash.rb Transform hash keys by a hash [Feature #16274] 2019-12-26 15:50:34 +09:00
test_ifunless.rb
test_integer.rb bignum.c (estimate_initial_sqrt): prevent integer overflow 2019-10-21 21:24:21 +09:00
test_integer_comb.rb
test_io.rb Reword keyword arguments warning messages to convey these are deprecation warnings 2019-12-23 16:47:33 -05:00
test_io_m17n.rb IO#set_encoding_by_bom should err when encoding is already set 2019-12-15 23:13:16 +09:00
test_iseq.rb catch up last commit. 2019-11-18 10:24:38 +09:00
test_iterator.rb
test_jit.rb Check MJIT support in one place 2019-12-01 10:53:59 -08:00
test_key_error.rb
test_keyword.rb Check Module#ruby2_keywords arity 2020-01-02 10:41:24 +09:00
test_lambda.rb Kernel#lambda: return forwarded block as non-lambda proc 2019-12-21 09:08:52 -05:00
test_lazy_enumerator.rb Fix Enumerator::Lazy#with_index 2019-12-11 04:59:56 +02:00
test_literal.rb Make rb_scan_args handle keywords more similar to Ruby methods (#2460) 2019-09-25 11:18:49 -07:00
test_m17n.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_m17n_comb.rb Update String#crypt tests to work on OpenBSD 2019-06-01 10:50:06 -07:00
test_marshal.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_math.rb
test_metaclass.rb
test_method.rb Make {Method,UnboundMethod}#super_method handle clone/bind/unbind 2019-12-04 01:35:34 +02:00
test_mixed_unicode_escapes.rb
test_module.rb Made the warning for deprecated constants follow the category flag 2019-12-19 09:52:16 +09:00
test_name_error.rb Split test_name_error.rb 2019-12-31 19:43:36 +09:00
test_nomethod_error.rb Split test_nomethod_error.rb 2019-12-31 19:43:36 +09:00
test_not.rb
test_notimp.rb test/ruby/test_notimp.rb: Use EnvUtil.timeout for timeout scale factor 2019-05-26 18:24:06 +09:00
test_numeric.rb Reword keyword arguments warning messages to convey these are deprecation warnings 2019-12-23 16:47:33 -05:00
test_object.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_objectspace.rb ObjectSpace._id2ref should check liveness. 2019-12-23 15:04:56 +09:00
test_optimization.rb Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
test_pack.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_parse.rb #@1 is no longer an embedded variable 2019-11-14 16:37:25 +09:00
test_path.rb Revert "Should return "." for File.extname("file.") also on Windows" 2019-12-23 11:54:25 +09:00
test_pattern_matching.rb test/ruby/test_pattern_matching.rb: suppress "unused variable" warning 2019-12-21 10:06:14 +09:00
test_pipe.rb
test_primitive.rb
test_proc.rb Fully separate positional arguments and keyword arguments 2020-01-02 18:40:45 -08:00
test_process.rb test/ruby/test_process.rb: suppress "unused variable" warning 2019-12-17 00:44:53 +09:00
test_rand.rb rand(beginless_range) raise Errno::EDOM instead of TypeError 2019-12-15 14:47:36 +09:00
test_range.rb range.c: Range#min with a beginless one now raise an explicit exception 2019-12-25 13:36:23 +09:00
test_rational.rb Check exception flag as a bool [Bug #15987] 2019-07-11 20:04:29 +09:00
test_rational2.rb
test_readpartial.rb
test_refinement.rb Make prepending a refined module after inclusion not break refinements 2019-11-28 19:57:04 +09:00
test_regexp.rb Revert "Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)" 2019-12-04 06:40:54 +09:00
test_require.rb Do not load files in build directory 2019-12-11 12:35:51 +09:00
test_require_lib.rb Detect started threads when require only 2019-12-06 00:12:58 +09:00
test_rubyoptions.rb Added -W:experimental command line option 2019-12-20 23:51:17 +09:00
test_rubyvm.rb
test_rubyvm_mjit.rb RubyVM::MJIT.pause(wait: true) should wait 2019-09-26 16:28:34 +09:00
test_settracefunc.rb Make TracePoint.stat a singleton method again (#2726) 2019-12-04 21:02:21 -05:00
test_signal.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_sleep.rb
test_sprintf.rb
test_sprintf_comb.rb
test_string.rb Refined the warning message for $, and $; 2019-12-20 15:09:23 +09:00
test_stringchar.rb
test_struct.rb Reword keyword arguments warning messages to convey these are deprecation warnings 2019-12-23 16:47:33 -05:00
test_super.rb Make super in instance_eval in method in module raise TypeError 2019-12-12 15:50:19 +09:00
test_symbol.rb Revert "Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)" 2019-12-04 06:40:54 +09:00
test_syntax.rb Reword keyword arguments warning messages to convey these are deprecation warnings 2019-12-23 16:47:33 -05:00
test_system.rb Removed unused variables 2019-06-30 08:45:01 +09:00
test_thread.rb fix a thread test. 2019-12-22 06:29:52 +09:00
test_thread_cv.rb
test_thread_queue.rb MinGW on Actions (#2791) 2019-12-30 23:19:31 -08:00
test_threadgroup.rb
test_time.rb Update test to handle x32 ABI compiled Ruby on Linux 2019-10-17 12:21:47 -07:00
test_time_tz.rb Added a test for [Bug #16159] 2019-12-17 11:53:30 +09:00
test_trace.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_transcode.rb add encoding conversion from/to CESU-8 2019-07-14 10:58:50 +09:00
test_undef.rb
test_unicode_escape.rb
test_variable.rb Supress class variable overtaken warning when original modules are the same 2019-11-29 20:32:03 +02:00
test_vm_dump.rb
test_weakmap.rb Allow non-finalizable objects in ObjectSpace::WeakMap 2019-08-29 20:40:52 +09:00
test_whileuntil.rb
test_yield.rb
ut_eof.rb