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 37a2c660aa Convert keyword argument to required positional hash argument for Class#new, Method#call, UnboundMethod#bind_call
Also add keyword argument separation warnings for Class#new and Method#call.

To allow for keyword argument to required positional hash converstion in
cfuncs, add a vm frame flag indicating the cfunc was called with an empty
keyword hash (which was removed before calling the cfunc).  The cfunc can
check this frame flag and add back an empty hash if it is passing its
arguments to another Ruby method.  Add rb_empty_keyword_given_p function
for checking if called with an empty keyword hash, and
rb_add_empty_keyword for adding back an empty hash to argv.

All of this empty keyword argument support is only for 2.7.  It will be
removed in 3.0 as Ruby 3 will not convert empty keyword arguments to
required positional hash arguments.  Comment all of the relevent code
to make it obvious this is expected to be removed.

Add rb_funcallv_kw as an public C-API function, just like rb_funcallv
but with a keyword flag.  This is used by rb_obj_call_init (internals
of Class#new).  This also required expected call_type enum with
CALL_FCALL_KW, similar to the recent addition of CALL_PUBLIC_KW.

Add rb_vm_call_kw as a internal function, used by call_method_data
(internals of Method#call and UnboundMethod#bind_call). Add tests
for UnboundMethod#bind_call keyword handling.
2019-09-06 19:41:23 -07:00
..
enc
allpairs.rb
beginmainend.rb
bug-11928.rb
bug-13526.rb
lbtest.rb
marshaltestlib.rb
sentence.rb
test_alias.rb
test_argf.rb
test_arithmetic_sequence.rb
test_arity.rb
test_array.rb Make Array#uniq return subclass instance if called on subclass instance 2019-09-02 13:42:31 -07:00
test_assignment.rb Fix parsing of mutiple assignment with rescue modifier 2019-08-09 09:25:30 -07:00
test_ast.rb Make RubyVM::AbstractSyntaxTree handle **nil syntax 2019-08-30 12:39:31 -07:00
test_autoload.rb
test_backtrace.rb
test_basicinstructions.rb
test_beginendblock.rb
test_bignum.rb
test_call.rb
test_case.rb
test_class.rb Show the previous definition location, 2019-08-29 13:24:00 +09:00
test_clone.rb
test_comparable.rb
test_complex.rb
test_complex2.rb
test_complexrational.rb
test_condition.rb
test_const.rb Remove support for nil::Constant 2019-08-14 09:50:14 -07:00
test_continuation.rb
test_default_gems.rb
test_defined.rb
test_dir.rb Prohibit nul-separated glob pattern [Feature #14643] (#2419) 2019-09-02 15:08:53 +09:00
test_dir_m17n.rb
test_econv.rb
test_encoding.rb
test_enum.rb
test_enumerator.rb
test_env.rb
test_eval.rb Fix dangling path name from fstring 2019-08-03 13:48:29 +09:00
test_exception.rb Do not clear backtrace in Exception#exception 2019-09-02 16:47:12 +09:00
test_fiber.rb Try shrinking tested VM stack max 2019-09-06 10:34:33 +09:00
test_file.rb Add tests for File.absolute_path? 2019-09-05 20:04:50 +09:00
test_file_exhaustive.rb test/ruby/test_file_exhaustive.rb: suppress method-redefined warning 2019-07-31 11:46:56 +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
test_gc.rb
test_gc_compact.rb
test_hash.rb check hash_hint is different. 2019-08-01 05:21:42 +09:00
test_ifunless.rb
test_integer.rb
test_integer_comb.rb
test_io.rb Examine TestIO#test_select_exceptfds on Solaris with 1 byte data 2019-09-03 16:51:01 +09:00
test_io_m17n.rb UTF LE is fixed at least the first 2 bytes 2019-08-13 23:38:05 +09:00
test_iseq.rb Iseq#to_binary: Add support for NoMatchingPatternError and TypeError 2019-08-09 01:29:53 +09:00
test_iterator.rb
test_jit.rb Check frozen flag on MJIT setinstancevariable 2019-09-04 11:10:21 +09:00
test_key_error.rb
test_keyword.rb Convert keyword argument to required positional hash argument for Class#new, Method#call, UnboundMethod#bind_call 2019-09-06 19:41:23 -07:00
test_lambda.rb add tests for orphan/not-orphan proc/lambda. 2019-07-15 14:17:27 +09:00
test_lazy_enumerator.rb Implement Enumerator::Lazy#eager [Feature #15901] 2019-09-04 16:16:46 +09:00
test_literal.rb
test_m17n.rb
test_m17n_comb.rb
test_marshal.rb
test_math.rb
test_metaclass.rb
test_method.rb Make Method/Proc#parameters handle **nil syntax 2019-08-30 12:39:31 -07:00
test_mixed_unicode_escapes.rb
test_module.rb Show the previous definition location, 2019-08-29 13:24:00 +09:00
test_not.rb
test_notimp.rb
test_numeric.rb Inspect dynamic symbol as well as static symbol 2019-08-25 11:39:20 +09:00
test_object.rb Make Object#singleton_methods work correctly for singleton classes of objects 2019-07-23 09:46:09 -07:00
test_objectspace.rb
test_optimization.rb Fix keyword argument separation warnings in test 2019-08-30 12:39:31 -07:00
test_pack.rb
test_parse.rb
test_path.rb
test_pattern_matching.rb Make pattern matching support **nil syntax 2019-09-01 16:39:34 +09:00
test_pipe.rb
test_primitive.rb
test_proc.rb change Proc#to_s format ('@...' -> ' ...') (#2362) 2019-08-14 16:25:15 +09:00
test_process.rb Give up stabilizing TestProcess on Travis osx 2019-08-06 00:48:00 +09:00
test_rand.rb
test_range.rb Aseert exception at negative step for non-endless range too 2019-08-29 11:16:17 +09:00
test_rational.rb
test_rational2.rb
test_readpartial.rb
test_refinement.rb Search refinement module along nested usings 2019-08-17 12:30:38 +09:00
test_regexp.rb
test_require.rb Use the original require for test_race_exception 2019-08-17 15:12:46 +09:00
test_rubyoptions.rb
test_rubyvm.rb
test_rubyvm_mjit.rb
test_settracefunc.rb solve "duplicate :raise event" in require too [Bug #15877] 2019-08-08 21:27:39 +09:00
test_signal.rb
test_sleep.rb
test_sprintf.rb
test_sprintf_comb.rb
test_string.rb Fixed heap-use-after-free 2019-08-15 23:39:14 +09:00
test_stringchar.rb
test_struct.rb Do not turn on keyword_init for Struct subclass if keyword hash is empty 2019-09-03 14:02:24 -07:00
test_super.rb
test_symbol.rb
test_syntax.rb Fix code locations of array node inside hash node when multiple kw splats 2019-09-05 09:57:43 -07:00
test_system.rb
test_thread.rb Fix keyword argument separation warnings in test 2019-08-30 12:39:31 -07:00
test_thread_cv.rb
test_thread_queue.rb Fix keyword argument separation warnings in test 2019-08-30 12:39:31 -07:00
test_threadgroup.rb
test_time.rb Relaxed delta of nanosec from Float time 2019-07-13 09:48:12 +09:00
test_time_tz.rb Enable more Time TZ tests on OpenBSD 2019-08-20 21:26:12 -07:00
test_trace.rb
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
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