ruby/lib
Jeremy Evans bb93659fef
Fix pp when passed a empty ruby2_keywords-flagged hash as array element (#2966)
This causes problems because the hash is passed to a block not
accepting keywords.  Because the hash is empty and keyword flagged,
it is removed before calling the block.  This doesn't cause an
ArgumentError because it is a block and not a lambda.  Just like
any other block not passed required arguments, arguments not
passed are set to nil.

Issues like this are a strong reason not to have ruby2_keywords
by default.

Fixes [Bug #16519]

This backports 28d31ead34 and
0ea759eac9, but needed to be modified
for 2.7 as 2.7 will perform empty keyword to positional hash
conversion for required arguments, which will happen if "v" in the
seplist method is empty when yielded.

Co-authored-by: NARUSE, Yui <nurse@users.noreply.github.com>
2020-03-31 16:10:57 +09:00
..
benchmark Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
bundler Merge bundler-2.1.4 2020-03-27 14:43:20 +09:00
cgi Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
csv Import CSV 3.1.2 (#2547) 2019-10-12 14:03:21 +09:00
delegate Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
did_you_mean Sync did_you_mean 2019-12-24 18:41:55 -05:00
drb lib/drb/drb.rb: Use ruby2_keywords for keyword separation 2020-03-13 22:38:05 +09:00
forwardable [ruby/forwardable] Bump version to 1.3.1 2019-12-11 20:23:53 +09:00
getoptlong Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
irb Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
logger [ruby/logger] bump version to 1.4.2 2019-12-10 21:03:36 +09:00
matrix [ruby/matrix] Bump version 2019-12-22 21:48:54 -05:00
net Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
observer Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
open3 Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
optparse Allow --enable/--disable options to take an argument 2019-05-15 17:31:11 +09:00
ostruct [ruby/ostruct] Bump version 2019-12-22 21:48:54 -05:00
pstore Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
racc Fixed misspellings 2019-12-20 12:19:45 +09:00
rdoc [ruby/rdoc] Version 6.2.1 2019-12-24 08:04:01 +09:00
reline Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
rexml [ruby/rexml] Only taint on Ruby <2.7 2019-11-18 01:00:25 +02:00
rinda lib/*: Prefer require_relative over require. 2018-11-02 17:52:33 +00:00
rss [ruby/rss] Only check taint on Ruby <2.7 2019-11-18 01:00:25 +02:00
rubygems Merge RubyGems 3.1.2 2019-12-20 11:50:32 +09:00
singleton Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
timeout Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
tracer [ruby/tracer] Use Gemfile instead of Gem::Specification#add_development_dependency. 2019-10-25 09:29:10 +09:00
unicode_normalize update to Unicode Version 12.1.0 (beta) 2019-04-05 00:58:51 +00:00
uri Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
webrick Fixed misspellings 2019-12-20 12:19:45 +09:00
yaml Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
.document lib/.document: add csv 2018-07-01 08:12:13 +00:00
abbrev.rb lib/abbrev.rb: Specify frozen_string_literal: true. 2017-02-09 16:12:00 +00:00
base64.rb base64.rb: improve performance of Base64.urlsafe_encode64 2019-12-10 14:32:35 +09:00
benchmark.rb Work on Benchmark::Tms documentation [ci skip] 2018-09-15 12:45:46 +00:00
bundler.rb Prepare to release bundler-2.1.0 2019-12-15 16:41:10 +09:00
cgi.rb change call CGI methods from :: to . 2019-08-04 09:19:30 +09:00
csv.rb Import CSV 3.1.2 (#2547) 2019-10-12 14:03:21 +09:00
debug.rb debug.rb: expand filenames in breakpoints 2019-12-05 13:28:34 +09:00
delegate.rb Fix SimpleDelegator respond_to? regression 2020-03-15 19:35:24 +09:00
did_you_mean.rb Promote did_you_mean to default gem 2019-11-30 21:08:19 -05:00
drb.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
English.rb Fixed class, module and method references [ci skip] 2019-08-16 00:00:50 +09:00
erb.rb Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
fileutils.gemspec Move gemspec of fileutils under the toplevel of lib directory. 2019-11-30 17:32:38 +09:00
fileutils.rb [ruby/fileutils] Bump version to 1.4.1 2019-11-30 18:09:41 +09:00
find.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
forwardable.rb [ruby/forwardable] Make def_*_delegator return name of method defined (Fixes #10) 2019-12-11 20:23:53 +09:00
getoptlong.rb getoptlong.rb: multiline regexps 2017-09-02 02:05:34 +00:00
ipaddr.gemspec Import ipaddr 1.2.2 2018-12-18 05:09:08 +00:00
ipaddr.rb Import ipaddr 1.2.2 2018-12-18 05:09:08 +00:00
irb.rb Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
logger.rb [ruby/logger] Document that shift_age of 0 disables log file rotation 2019-12-10 20:59:36 +09:00
matrix.rb Simplified ErrDimensionMismatch class 2019-11-30 08:00:40 +09:00
mkmf.rb Added link_command for C++ 2019-09-19 19:06:18 +09:00
mutex_m.gemspec Try to load version file of github repository at first. 2018-07-31 12:56:17 +00:00
mutex_m.rb lib/mutex_m.rb: fix example code in documentation 2018-10-21 14:02:00 +00:00
observer.rb lib/observer.rb: Specify frozen_string_literal: true. 2017-01-13 12:08:29 +00:00
open-uri.rb Add URI#open to warning message 2019-12-20 01:40:00 +09:00
open3.rb open3.rb don't use keyword splat (**). 2018-12-12 06:48:46 +00:00
optionparser.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
optparse.rb Revert "Method reference operator" 2019-11-12 17:24:48 +09:00
ostruct.rb [ruby/ostruct] Create OpenStruct::VERSION 2019-12-22 21:48:54 -05:00
pp.rb Fix pp when passed a empty ruby2_keywords-flagged hash as array element (#2966) 2020-03-31 16:10:57 +09:00
prettyprint.rb * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true". 2015-11-10 11:48:14 +00:00
prime.gemspec default gems: add missing comment in gemspec 2018-10-12 19:58:11 +00:00
prime.rb [ruby/prime] Bump version 2019-12-22 21:48:54 -05:00
pstore.rb Make rb_scan_args handle keywords more similar to Ruby methods (#2460) 2019-09-25 11:18:49 -07:00
racc.rb Backport racc-1.4.15 from upstream. 2019-06-19 18:17:25 +09:00
rdoc.rb Merge rdoc-6.1.0.beta1. 2018-08-27 01:30:18 +00:00
readline.gemspec [ruby/readline] Version 0.0.2 2019-12-25 10:57:44 +09:00
readline.rb Suppress duplicated "require 'reline'" 2019-10-23 23:59:53 +09:00
reline.rb Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
resolv-replace.rb * lib/resolv-replace.rb: Specify frozen_string_literal: true. 2015-11-14 08:25:30 +00:00
resolv.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
rss.rb Upgrade RSS to 0.2.8 2019-01-25 06:35:04 +00:00
rubygems.rb Merge RubyGems 3.1.2 2019-12-20 11:50:32 +09:00
securerandom.rb fix visibility of SecureRandom.gen_random 2019-05-14 11:44:20 +09:00
set.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
shellwords.rb Use \& instead of \1 with capture 2019-10-17 12:51:29 +09:00
singleton.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
tempfile.rb Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
time.rb Support %U/%u/%W/%w/%V/%g/%G formats in Time.strptime 2019-11-21 03:32:20 +02:00
timeout.rb Add some documentation to Timeout#timeout about possible issues 2019-06-04 19:19:37 -07:00
tmpdir.rb Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
tracer.rb Fixed misspellings 2019-12-20 12:19:45 +09:00
tsort.rb * lib/tsort.rb: Specify frozen_string_literal: true. 2015-11-14 08:46:11 +00:00
un.rb Use double splat for keyword args by a hash object in lib/un.rb 2019-08-31 20:55:35 +09:00
uri.rb Revert "Revert "Promote uri to default gems"" 2019-11-11 22:21:43 +09:00
weakref.rb lib/weakref: Remove incorrect example [DOC] [Bug #14031] 2017-10-24 18:08:00 +00:00
webrick.rb lib/webrick.rb: use require_relative for webrick/utils.rb 2019-08-25 19:29:52 +09:00
yaml.rb Update the canonical repository url 2019-08-19 17:52:20 +09:00