Commit graph

64552 commits

Author SHA1 Message Date
Nobuyoshi Nakada
b12197dbbb
Updated the benchmark-driver version 2020-06-08 09:25:53 +09:00
Nobuyoshi Nakada
d0b2332e93
Defaulted benchmark output to markdown with comarison 2020-06-08 09:25:22 +09:00
git
11a6c405bc * 2020-06-08 [ci skip] 2020-06-08 03:47:09 +09:00
Burdette Lamar
7c2f742c40
Enhanced Rdoc for Hash (#3187)
Methods:

    #<=
    #<
    #>=
    #>
    #to_proc

Also, a small amount of housekeeping: Adding backslash to some class name to prevent linking.
2020-06-07 13:46:43 -05:00
Nobuyoshi Nakada
c0ba35f334
Differentiate ... in lambda arguments 2020-06-07 18:44:07 +09:00
Ryuta Kamizono
9d24ddbb53 Fix make benchmark example
`make benchmark ARGS=../benchmark/erb_render.yml` does not work.

```
% make benchmark ARGS=../benchmark/erb_render.yml
/Users/kamipo/.rbenv/shims/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \
	            --executables="compare-ruby::/Users/kamipo/.rbenv/shims/ruby --disable=gems -I.ext/common --disable-gem" \
	            --executables="built-ruby::./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems --disable-gem" \
	            ../benchmark/erb_render.yml 
Traceback (most recent call last):
	6: from ./benchmark/benchmark-driver/exe/benchmark-driver:112:in `<main>'
	5: from ./benchmark/benchmark-driver/exe/benchmark-driver:112:in `flat_map'
	4: from ./benchmark/benchmark-driver/exe/benchmark-driver:112:in `each'
	3: from ./benchmark/benchmark-driver/exe/benchmark-driver:122:in `block in <main>'
	2: from /Users/kamipo/.rbenv/versions/2.6.6/lib/ruby/2.6.0/psych.rb:577:in `load_file'
	1: from /Users/kamipo/.rbenv/versions/2.6.6/lib/ruby/2.6.0/psych.rb:577:in `open'
/Users/kamipo/.rbenv/versions/2.6.6/lib/ruby/2.6.0/psych.rb:577:in `initialize': No such file or directory @ rb_sysopen - ../benchmark/erb_render.yml (Errno::ENOENT)
make: *** [benchmark] Error 1

% make benchmark ARGS=benchmark/erb_render.yml
/Users/kamipo/.rbenv/shims/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \
	            --executables="compare-ruby::/Users/kamipo/.rbenv/shims/ruby --disable=gems -I.ext/common --disable-gem" \
	            --executables="built-ruby::./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems --disable-gem" \
	            benchmark/erb_render.yml 
Calculating -------------------------------------
                     compare-ruby  built-ruby 
          erb_render     825.454k    783.664k i/s -      1.500M times in 1.817181s 1.914086s

Comparison:
                       erb_render
        compare-ruby:    825454.4 i/s 
          built-ruby:    783663.8 i/s - 1.05x  slower

```
2020-06-07 10:33:14 +09:00
szTheory
fa37a220f6 docs: fix typo 2020-06-07 10:32:33 +09:00
Jeremy Evans
f8b4340fa2 Add leading arguments support to arguments forwarding
The idFWD_KWREST sections may be wrong. However, the existing
idFWD_KWREST sections for ... without leading arguments are already
broken.

Implements [Feature #16378]
2020-06-06 17:07:11 -07:00
Yuki Nishijima
4178cbd297 Remove experimental feaures and related code completely
Original pull request: https://github.com/ruby/did_you_mean/pull/147
2020-06-06 14:13:19 -04:00
Yuki Nishijima
6d4ab96c47 Make test for no method error more reliable
This test should not depend on the bahaviour of the did_you_mean gem.
2020-06-06 13:48:24 -04:00
git
2a042f08a5 * 2020-06-07 [ci skip] 2020-06-07 02:02:29 +09:00
Yuki Nishijima
7cfd6a0bb9 Fix build failures 2020-06-06 13:02:08 -04:00
Yuki Nishijima
e5f5446528 Sync did_you_mean 2020-06-06 13:02:08 -04:00
Nobuyoshi Nakada
0c00a4176b
Hash marks in Makefile need to be escaped [Bug #16935] 2020-06-06 16:46:05 +09:00
git
ba6f1bcce9 * 2020-06-06 [ci skip] 2020-06-06 11:02:31 +09:00
Nobuyoshi Nakada
e38a2ecffd
Run tests in more parallel 2020-06-06 00:35:45 +09:00
Nobuyoshi Nakada
cf1adf985a
Aligned test-bundler-parallel at the end of the test order 2020-06-05 21:54:39 +09:00
Nobuyoshi Nakada
53c0737ae4
Try test-bundler-parallel in GitHub Actions 2020-06-05 21:39:45 +09:00
Nobuyoshi Nakada
e11ffe0aaf
Fixup test-bundler-parallel
* Do not chdir in the runner process, to access miniruby.  Chdir
  in worker processes instead.
* GNU make does not export newly added environment variables by
  default, set PARALLEL_TESTS_EXECUTABLE in the runner.
2020-06-05 21:34:26 +09:00
Hiroshi SHIBATA
0afbfddc0d
Fixup 347127794e 2020-06-05 19:20:48 +09:00
Hiroshi SHIBATA
347127794e
spec/bundler/support/parallel.rb is no longer used parallel_rspec. 2020-06-05 19:01:39 +09:00
Aaron Patterson
7e289cdf3f [ruby/psych] Fixing compatibility with libyaml 0.2.5
The main issue is that commas aren't allowed in local tags.  libyaml
was updated to follow the spec, and our tests were out of date.

See: https://github.com/yaml/libyaml/issues/196

3f5e520fd3
2020-06-05 11:49:56 +09:00
Po-Chuan Hsieh
6b9e363aa0 [ruby/psych] Add LICENSE to the gem
02919596fa
2020-06-05 11:49:56 +09:00
David Rodríguez
cd3d035e8a [ruby/psych] Remove unnecessary version guard from versions.rb
Removing it triggers the following warnings when running `bundle` under
jruby from the root of the `psych` repo prints the following warnings:

```
/path/to/jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:7: warning: already initialized constant VERSION
/path/to//jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:10: warning: already initialized constant DEFAULT_SNAKEYAML_VERSION
```

This is because bundler loads the versions file relatively from the
local gemspec, and then internally loads the psych gem, causing the
redefinition warnings.

Instead, we modify the $LOAD_PATH so that when working locally on the
`psych` repo, the local version of `psych` gets used.

a3fc8191a7
2020-06-05 11:49:56 +09:00
Mark Thorn
f245976386 [ruby/psych] Fix ArgumentError with leading and trailing underscores in number strings.
ac2d2c9b1b
2020-06-05 11:49:56 +09:00
David Rodríguez
5ed58b90d1 [ruby/psych] Fix gem installation
Current version is not installable because the gemspec is invalid, since
it includes a `.travis.yml` file that no longer exists, so `rake
install` fails like this:

```
$ rake install
rake aborted!
WARNING:  See https://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    [".travis.yml"] are not files
```

32b18ca7ca
2020-06-05 11:49:56 +09:00
Jean Boussier
f641d78a6f [ruby/psych] Implement freeze option for Pysch.load
7dae24894d
2020-06-05 11:49:56 +09:00
Jean Boussier
4085c51a51 [ruby/psych] Implement a freeze load option
04f97f7a56
2020-06-05 11:49:56 +09:00
Jean Boussier
591a3326e3 [ruby/psych] Refactor symbolize_names
3e472ab2d7
2020-06-05 11:49:56 +09:00
Kazuhiro NISHIYAMA
efa8df2886
local_address may raise IOError in debug print
20200605T020004Z.fail.html.gz
```
[  984/20282] IMAPTest#test_connection_closed_without_greeting#<Thread:0x000055b6e9589d28 /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:133 run> terminated with exception (report_on_exception is true):
/home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `local_address': closed stream (IOError)
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `connect_address'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block (2 levels) in test_connection_closed_without_greeting'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each_object'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `map'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block in test_connection_closed_without_greeting'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:134:in `block in start_server'
```
2020-06-05 11:45:30 +09:00
Kazuhiro NISHIYAMA
e17028e48b
Add sockets to debug print
debug print does not include `in_tcp_socket_2`,
so I think other socket connected to server socket.
Add sockets to debug print, and check other socket is in same process or not.

20200604T160009Z.fail.html.gz
```
  1) Failure:
IMAPTest#test_connection_closed_without_greeting [/export/home/chkbuild/chkbuild-gcc/tmp/build/20200604T160009Z/ruby/test/net/imap/test_imap.rb:523]:
[Net::IMAP::Error] exception expected, not #<RuntimeError: {:server=>#<TCPServer:(closed)>,
 :port=>35490,
 :server_created=>
  {:server=>"#<TCPServer:fd 10, AF_INET6, ::1, 35490>", :t=>45917010.30510591},
 :in_start_server_before_accept=>{:t=>45917010.305154555},
 :in_tcp_socket=>
  {:host=>"::1",
   :port=>35490,
   :server=>"#<TCPServer:fd 10, AF_INET6, ::1, 35490>",
   :t=>45917010.40560127},
 :in_start_server=>
  {:sock_addr=>["AF_INET6", 35490, "::1", "::1"],
   :sock_peeraddr=>["AF_INET6", 51584, "::1", "::1"],
   :t=>45917010.40767231},
 :in_start_server_sock_closed=>{:t=>45917010.40770047},
 :in_rescue=>
  {:e=>#<Errno::EINVAL: Invalid argument - connect(2) for [::1]:35490>,
   :server_addr=>"::1",
   :t=>45917010.40867455}}
>.
```
2020-06-05 10:48:47 +09:00
Nobuyoshi Nakada
449b62ba01
Skip tests which do not work until installed when load-relative 2020-06-05 10:20:38 +09:00
Nobuyoshi Nakada
073ff73972
Show better failure messages 2020-06-05 10:20:06 +09:00
Kir Shatrov
a16fcb4205 Update docs in net/http.rb
...to reflect that Net::HTTP.start accepts keep_alive_timeout as an option.
2020-06-05 08:46:06 +09:00
Samuel Williams
4bff8e8423 Ensure that the head of the vacancy list is correctly inserted into the linked list.
See <https://bugs.ruby-lang.org/issues/16814> for more details.
2020-06-05 11:40:59 +12:00
git
e262452b56 * 2020-06-05 [ci skip] 2020-06-05 07:33:20 +09:00
David Rodríguez
cfcb52fbe3 Enable Style/MethodCallWithoutArgsParentheses in rubygems 2020-06-05 07:32:42 +09:00
Yuki Nishijima
77ba8a1d61 [rubygems/rubygems] Use LoadError#path to figure out the argument passed to 'require'
5995394ec4
2020-06-05 07:32:42 +09:00
David Rodríguez
5bbddba20b [rubygems/rubygems] Modify RakeFileUtils.verbose_flag only when needed
d490309d75
2020-06-05 07:32:42 +09:00
David Rodríguez
b35793e0e7 [rubygems/rubygems] Fix test warnings
Since `rake package` started printing to stdout by default, we get these
warnings printed when running rubygems tests:

```
$ rake
Run options: --seed 6097

# Running:

...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................mkdir -p pkg
mkdir -p pkg/pkgr-1.2.3
rm -f pkg/pkgr-1.2.3/x
ln x pkg/pkgr-1.2.3/x
rm -f pkg/pkgr-1.2.3/y
ln y pkg/pkgr-1.2.3/y
cd pkg/pkgr-1.2.3
cd -
....

Finished in 50.578889s, 43.0812 runs/s, 134.8191 assertions/s.
2179 runs, 6819 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for Unit Tests to /home/deivid/Code/rubygems/coverage. 8080 / 8978 LOC (90.0%) covered.
```

The reason is that, although these tests wrap the
`Rake.application["package"].invoke` with a `capture_io` block, the rake
application initialization happens outside of this block, and a copy of
`$stdout` is saved in there, and that's where the task prints. So the
`capture_io` `$stdout` and `$stderr` dance is not effective.

To fix, we move the `Rake` application initialization inside the
`capture_io` block.

7f6e2398a5
2020-06-05 07:32:42 +09:00
David Rodríguez
8739bc449f [rubygems/rubygems] Only run optional validations in packaging contexts
f4fe949dfa
2020-06-05 07:32:42 +09:00
David Rodríguez
e9c8066bd9 [rubygems/rubygems] Split validations into required and optional
55b09a7aa2
2020-06-05 07:32:42 +09:00
David Rodríguez
455330143a [rubygems/rubygems] Mention that some validations only warn
32c7f7f484
2020-06-05 07:32:42 +09:00
David Rodríguez
257e6cda32 [rubygems/rubygems] Reword validate method header
It's not so basic anymore, and it does much more than validating
required fields.

3c0be4cdeb
2020-06-05 07:32:42 +09:00
David Rodríguez
fc10f35f3d [rubygems/rubygems] Reuse error helper
3a44b6f846
2020-06-05 07:32:42 +09:00
David Rodríguez
3cfe190099 [rubygems/rubygems] Move docs to a better place
c87ac90528
2020-06-05 07:32:42 +09:00
David Rodríguez
15018f20dd [rubygems/rubygems] Deprecate some methods that are only there for compatibility
b4948bda74
2020-06-05 07:32:42 +09:00
Olle Jonsson
5eacf4e72c Enable rubocop-performance StartWith cop
- this would keep the could-be-a-string-method matches few
2020-06-05 07:32:42 +09:00
David Rodríguez
f8f5e7fadf [rubygems/rubygems] Respect files loaded from default gems before rubygems
f3da3c1190
2020-06-05 07:32:42 +09:00
Benoit Daloze
ff5ca548c3 [rubygems/rubygems] Use a real file to run the test
* JRuby doesn't support multi-line -e.

1fb6657a7d
2020-06-05 07:32:42 +09:00