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 e7274a8ec4 Convert empty keyword hash to required positional argument and warn
In general, we want to ignore empty keyword hashes.  The only case
where we want to allow them for backwards compatibility is when
they are necessary to satify the final required positional argument.
In that case, we want to not ignore them, but we do want to warn,
as that will be going away in Ruby 3.

This commit implements this support for regular methods and
attr_writer methods.

In order to allow send to forward arguments correctly, send no
longer removes empty keyword hashes.  It is the responsibility of
the final method to remove the empty keyword hashes now.  This
change was necessary as otherwise send could remove the empty
keyword hashes before the regular or attr_writer methods could
move them to required positional arguments.

For completeness, add tests for keyword handling regular
methods calls.

This makes rb_warn_keyword_to_last_hash non-static in vm_args.c
so it can be reused in vm_insnhelper.c, and also moves declarations
before statements in the rb_warn_* functions in vm_args.c.
2019-09-05 17:47:12 -07:00
..
-ext- Warn instance variable E 2019-08-10 13:18:41 +09:00
base64
benchmark Aliases capture_output to capture_io for test-unit compatiblity. 2019-08-08 17:19:23 +09:00
bigdecimal
cgi change call CGI methods from :: to . 2019-08-04 09:19:30 +09:00
coverage
csv Fix remaining warning issues in the tests due to keyword argument separation 2019-08-30 12:39:31 -07:00
date date_parse.c: avoid copying 2019-08-12 20:41:11 +09:00
dbm
digest
drb test/drb/drbtest.rb: Skip test_06_timeout on Solaris10s 2019-09-02 22:33:27 +09:00
dtrace
erb
etc
excludes Drop unstable Travis osx in favor of GitHub Actions 2019-09-03 01:01:48 +09:00
fiddle
fileutils Improve same directory detection in FileUtils 2019-08-06 09:01:04 +09:00
gdbm
io
irb Set IRB::Context#return_format on test clarify 2019-08-16 07:10:45 +09:00
json
lib Automatically detect missing symbols 2019-09-01 16:31:15 +09:00
logger Move helper file of logger to under the test/logger. 2019-07-15 14:43:08 +09:00
matrix Add abs to Matrix (#2199) 2019-08-21 16:36:39 -04:00
misc
mkmf Fix keyword argument separation warnings in test 2019-08-30 12:39:31 -07:00
monitor
net Add Net::FTP#features and Net::FTP#option 2019-09-02 14:43:51 +09:00
nkf
objspace
open-uri The default charset of text/* media type is UTF-8. 2019-07-15 09:36:52 +09:00
openssl
optparse
ostruct
pathname
psych [ruby/psych] Suppress uninitialized instance variable warnings 2019-07-25 07:52:17 +09:00
racc
rdoc Remove Travis CI workaround 2019-08-17 20:20:04 +09:00
readline Fix use_lib_reline for test/readline 2019-08-27 01:42:41 +09:00
reline Add test with encoding. 2019-08-27 01:23:46 +09:00
resolv Use lowercase letters for IPv6 addresses. 2019-07-30 11:59:54 +09:00
rexml [ruby/rexml] xpath: add missing value conversions for equality and relational expressions 2019-08-04 11:55:55 +09:00
rinda Fix Leaked thread 2019-07-31 17:45:43 +09:00
ripper Make ripper support **nil syntax 2019-08-30 12:39:31 -07:00
rss
ruby Convert empty keyword hash to required positional argument and warn 2019-09-05 17:47:12 -07:00
rubygems [rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offenses 2019-09-05 18:48:15 +09:00
scanf
sdbm
shell
socket Try extending timeout of IO.select 2019-09-03 20:34:52 +09:00
stringio [ruby/stringio] Supported BOM 2019-08-14 11:20:58 +09:00
strscan
syslog
uri Make portable for standalone test-unit gem. 2019-08-19 18:37:22 +09:00
webrick Adjust indent [ci skip] 2019-08-11 00:44:13 +09:00
win32ole
yaml
zlib Suppress deflateParams() warnings 2019-07-24 22:07:10 +09:00
runner.rb Separated tool/test/runner.rb and test/runner.rb 2019-07-25 16:57:38 +09:00
test_abbrev.rb
test_cmath.rb
test_delegate.rb
test_extlibs.rb
test_find.rb
test_forwardable.rb Document and add spec for delegating to constants in Forwardable 2019-07-26 07:35:58 -07:00
test_ipaddr.rb
test_mutex_m.rb
test_observer.rb
test_open3.rb
test_pp.rb
test_prettyprint.rb
test_prime.rb
test_pstore.rb Expand the timeout of test_pstore_files_are_accessed_as_binary_files 2019-08-05 12:52:14 +09:00
test_pty.rb
test_rbconfig.rb
test_securerandom.rb Test SecureRandom.uuid format 2019-07-26 09:56:53 -07:00
test_set.rb
test_shellwords.rb
test_singleton.rb
test_sync.rb
test_syslog.rb
test_tempfile.rb
test_time.rb
test_timeout.rb
test_tmpdir.rb
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb