9655 Commits

Author SHA1 Message Date
rm155
ee948fc1b4 [ruby/csv] Add support for Ractor (https://github.com/ruby/csv/pull/218)
https://github.com/ruby/csv/commit/a802690e11
2021-10-24 05:57:33 +09:00
Sutou Kouhei
274882be62 [ruby/csv] Use test-unit gem instead of test-framework of ruby repo
https://github.com/ruby/csv/commit/9c4add0d31
2021-10-24 05:57:33 +09:00
Anthony Hernandez
8fde54a3b5 [ruby/csv] CSV(): Add support for Ruby 3 (https://github.com/ruby/csv/pull/215)
The implementation of the `CSV` shortcut method is broken in Ruby 3
for calls that look like this:

```ruby
CSV(write_stream, col_sep: "|", headers: headers, write_headers: true) do |csv|
  ...
end
```

The above will result in the following error when the `CSV` method attempts to pass
on arguments to `CSV#instance`:

```
ArgumentError: wrong number of arguments (given 2, expected 0..1)
```

The issue is due to the changes in Ruby 3 relating to positional & keyword arguments.

This commit updates the `CSV()` shortcut implementation to work with Ruby 3, and also
updates the documentation for the shortcut method.

https://github.com/ruby/csv/commit/310dee45fa
2021-10-24 05:57:33 +09:00
Kenta Murata
1073975013 [ruby/csv] CI: Stop coverage mesurement
https://github.com/ruby/csv/commit/5ff3b95018
2021-10-24 05:57:33 +09:00
Sutou Kouhei
8ba98f83b0 [ruby/csv] Use "\n" for the default row separator on Ruby 3.0 or later
https://github.com/ruby/csv/commit/1f9cbc170e
2021-10-24 05:57:33 +09:00
Joakim Antman
7f3dd601c8 [ruby/csv] Changed line ending handling to consider the combination \r\n as a single entry when row is faulty (https://github.com/ruby/csv/pull/220)
https://github.com/ruby/csv/commit/29cef9ea9d
2021-10-24 05:57:33 +09:00
Sutou Kouhei
39ecdabe67 [ruby/csv] Resolve CSV::Converters and HeaderConverters lazy
It's for Ractor. If you want to use the built-in converters, you
should call Ractor.make_shareable(CSV::Converters) and/or
Ractor.make_shareable(CSV::HeaderConverters).

https://github.com/ruby/csv/commit/b0b1325d6b
2021-10-24 05:57:33 +09:00
Vince
8aaa1c279f [ruby/csv] doc: Match text to the struct name (https://github.com/ruby/csv/pull/217)
https://github.com/ruby/csv/commit/744e41130c
2021-10-24 05:57:33 +09:00
Sutou Kouhei
e40baca33d [ruby/csv] Bump version
https://github.com/ruby/csv/commit/3025070cea
2021-10-24 05:57:33 +09:00
Yuki Nishijima
e353bcd111 Sync did_you_mean 2021-10-22 21:56:26 -04:00
Yuki Nishijima
66df18c55e Sync did_you_mean again 2021-10-22 21:00:23 -04:00
Yuki Nishijima
22249bbb37 Revert "Sync did_you_mean"
This reverts commit e22d293e06966733e71a7fd9725eee06c03d0177.
2021-10-22 20:56:26 -04:00
Yuki Nishijima
e22d293e06 Sync did_you_mean 2021-10-22 20:35:40 -04:00
rm155
d09cb64ae5 [ruby/mutex_m] Make VERSION shareable
https://github.com/ruby/mutex_m/commit/a839e29d04
2021-10-22 19:49:34 +09:00
Tiago
553f234a07 [ruby/uri] URI#HTTP#origin and URI#HTTP#authority (https://github.com/ruby/uri/pull/30)
https://github.com/ruby/uri/commit/bf13946c32

Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
2021-10-22 19:48:36 +09:00
Olle Jonsson
c8ad024e8e [ruby/delegate] gemspec: Drop unused executables directives
https://github.com/ruby/delegate/commit/81a3c32140
2021-10-22 19:48:22 +09:00
Justin Searls
d0cad8ad83 [rubygems/rubygems] Re-enable default_ignores option for standard
I am not sure why this flag was turned off (it wasn't explained in my commit message in 0365dc852767ae589376a7aad1fb129738e408b0 or in my PR in #4411). 

Whatever the reason, without `default_ignores` turned on, most default CI configurations will immediately fail, as they most likely vendor and cache their dependencies under `vendor`, which will cause standard to run against all the vendored gems and (most likely) fail. I think we should remove this before this feature is released.

https://github.com/rubygems/rubygems/commit/677f74be48
2021-10-22 03:33:44 +09:00
Hiroshi SHIBATA
eac7a71062 [ruby/prettyprint] Bump up prettyprint version to 0.1.1
https://github.com/ruby/prettyprint/commit/0e8eee5f5f
2021-10-21 21:05:39 +09:00
Hiroshi SHIBATA
ba3c2593ab [ruby/pp] Bump up pp version to 0.2.1
https://github.com/ruby/pp/commit/06b839b9ca
2021-10-21 21:04:14 +09:00
Hiroshi SHIBATA
9f398d023b [ruby/securerandom] Bump up securerandom version to 0.1.1
https://github.com/ruby/securerandom/commit/5f9d3d1dfa
2021-10-21 21:03:08 +09:00
Hiroshi SHIBATA
aca0dcc5f9 [ruby/rinda] Bump up rinda version to 0.1.1
https://github.com/ruby/rinda/commit/d394ba107e
2021-10-21 21:02:37 +09:00
Hiroshi SHIBATA
b8d49d0d01 [ruby/optparse] Bump up optparse version to 0.2.0
https://github.com/ruby/optparse/commit/1226b670e6
2021-10-21 21:01:34 +09:00
Hiroshi SHIBATA
cb4c98f949 [ruby/net-http] Bump up net-http version to 0.2.0
https://github.com/ruby/net-http/commit/f3e65e2a31
2021-10-21 21:01:06 +09:00
Hiroshi SHIBATA
cc2f76041d [ruby/net-protocol] Bump up net-protocol version to 0.1.2
https://github.com/ruby/net-protocol/commit/088e52609a
2021-10-21 21:00:53 +09:00
Hiroshi SHIBATA
8ef125c838 [ruby/uri] Bump up uri version to 0.11.0
https://github.com/ruby/uri/commit/1619f713e6
2021-10-21 21:00:04 +09:00
Hiroshi SHIBATA
422b057d65 [ruby/ostruct] Bump up ostruct version to 0.5.0
https://github.com/ruby/ostruct/commit/c535a406f8
2021-10-21 20:54:33 +09:00
Hiroshi SHIBATA
6b08aaf228 [ruby/fileutils] Bump up fileutils version to 1.6.0
https://github.com/ruby/fileutils/commit/918d19e4f2
2021-10-21 20:14:57 +09:00
Hiroshi SHIBATA
6b1efc54c8 [ruby/racc] Bump up racc version to 1.6.0
https://github.com/ruby/racc/commit/0c5fe2637c
2021-10-19 21:13:29 +09:00
Hiroshi SHIBATA
de68de87ea [ruby/logger] Bump up logger version to 1.4.4
https://github.com/ruby/logger/commit/82a59c8d3f
2021-10-19 21:08:48 +09:00
Hiroshi SHIBATA
a7d07ee90d [ruby/tempfile] Bump up tempfile version to 0.1.2
https://github.com/ruby/tempfile/commit/e5ec902256
2021-10-19 20:55:55 +09:00
Mike Dalessio
4ffc3fb019 [ruby/rdoc] fix: alias to method with call-seq
This change fixes alias call-seq to return nil if the method's
call-seq does not specify the alias.

Previously, the alias's call-seq would be an empty string in this case
which broke darkfish rendering.

This change also backfills test coverage for 0ead786 which moved
call-seq deduplication into AnyMethod.

https://github.com/ruby/rdoc/commit/5ce2789b6f
2021-10-16 06:31:11 +09:00
Mike Dalessio
4c42540da2 [ruby/rdoc] Support linking #==
See related commits:

- ebc66662 for #===
- 4943d208 for #[], #[]=, #<<, and #>>

https://github.com/ruby/rdoc/commit/8e47f7840a
2021-10-16 01:40:47 +09:00
Mike Dalessio
7aec65add4 [ruby/rdoc] feat: add support for :category: on C functions
https://github.com/ruby/rdoc/commit/45c92005fe
2021-10-16 01:39:36 +09:00
Mike Dalessio
fbd0516afc [ruby/rdoc] fix: comments in C files use the global markup option
Previously, Parser::C comments all defaulted to "rdoc" format, even
when the user had set a different default with the `--markup=<choice>`
option.

https://github.com/ruby/rdoc/commit/4643b08a26
2021-10-16 01:39:06 +09:00
Mike Dalessio
d4894e81c0 [ruby/rdoc] extract Comment creation in Parser::C
This is a prefactor for fixing comment format handling.

https://github.com/ruby/rdoc/commit/a3d366feed
2021-10-16 01:39:05 +09:00
Nobuyoshi Nakada
19beb028e7
Make explicit opening files 2021-10-15 19:59:14 +09:00
Jack Schuss
46291a29fb [rubygems/rubygems] Update broken link in Bundler::Fetcher::CertificateFailureError
https://github.com/rubygems/rubygems/commit/11b5d479cb
2021-10-15 04:55:23 +09:00
Hiroshi SHIBATA
befb37c2c4
[ruby/drb] Bump up drb version to 2.1.0
https://github.com/ruby/drb/commit/e4b7b68d67
2021-10-14 21:14:35 +09:00
Hiroshi SHIBATA
20bd9e7c61
[ruby/drb] Bump up drb version to 2.0.5
https://github.com/ruby/drb/commit/7edf67654c
2021-10-14 21:14:35 +09:00
Hiroshi SHIBATA
e6b3eab1b7
[ruby/time] Bump up time version to 0.2.0
https://github.com/ruby/time/commit/b9dd593b23
2021-10-14 21:14:35 +09:00
Hiroshi SHIBATA
9c96bcf07d
[ruby/open-uri] Bump up open-uri version to 0.2.0
https://github.com/ruby/open-uri/commit/ec4275a1eb
2021-10-14 21:14:34 +09:00
Hiroshi SHIBATA
d13c6c56dd [ruby/base64] Bump up base64 version to 0.1.1
https://github.com/ruby/base64/commit/b9e23b27f9
2021-10-14 20:41:15 +09:00
Hiroshi SHIBATA
b6e5264783 [ruby/find] Bump up find version to 0.1.1
https://github.com/ruby/find/commit/90c35c477a
2021-10-14 20:26:15 +09:00
Hiroshi SHIBATA
9ed1250402
[ruby/yaml] Bump up yaml version to 0.2.0
https://github.com/ruby/yaml/commit/cef5360823
2021-10-14 20:16:04 +09:00
Hiroshi SHIBATA
2c75fc915e [ruby/timeout] Bump up timeout version to 0.2.0
https://github.com/ruby/timeout/commit/02e792ddd8
2021-10-14 20:12:29 +09:00
Hiroshi SHIBATA
6f67a78ad6
[ruby/cgi] Bump up cgi version to 0.3.0
https://github.com/ruby/cgi/commit/95324433b4
2021-10-14 20:09:41 +09:00
Hiroshi SHIBATA
caf34400c0
[ruby/benchmark] Bump up benchamark version to 0.2.0
https://github.com/ruby/benchmark/commit/eea1657fa2
2021-10-14 20:09:41 +09:00
David Rodríguez
fa12e3e2f7 [ruby/fileutils] Remove counterproductive optimization
I think it's debatable which is the most common usage of
`FileUtils.mkdir_p`, but even assuming the most common use case is
creating a folder when it doesn't previously exist but the parent does,
this optimization doesn't seem to have a noticiable effect there while
harming other use cases.

For benchmarks, I created this script

```ruby
require "benchmark/ips"

Benchmark.ips do |x|
  x.report("old mkdir_p - exists") do
    FileUtils.mkdir_p "/tmp"
  end

  x.report("new_mkdir_p - exists") do
    FileUtils.mkdir_p_new "/tmp"
  end

  x.compare!
end

FileUtils.rm_rf "/tmp/foo"

Benchmark.ips do |x|
  x.report("old mkdir_p - doesnt exist, parent exists") do
    FileUtils.mkdir_p "/tmp/foo"
    FileUtils.rm_rf "/tmp/foo"
  end

  x.report("new_mkdir_p - doesnt exist, parent exists") do
    FileUtils.mkdir_p_new "/tmp/foo"
    FileUtils.rm_rf "/tmp/foo"
  end

  x.compare!
end

Benchmark.ips do |x|
  x.report("old mkdir_p - doesnt exist, parent either") do
    FileUtils.mkdir_p "/tmp/foo/bar"
    FileUtils.rm_rf "/tmp/foo"
  end

  x.report("new_mkdir_p - doesnt exist, parent either") do
    FileUtils.mkdir_p_new "/tmp/foo/bar"
    FileUtils.rm_rf "/tmp/foo"
  end

  x.compare!
end

Benchmark.ips do |x|
  x.report("old mkdir_p - more levels") do
    FileUtils.mkdir_p "/tmp/foo/bar/baz"
    FileUtils.rm_rf "/tmp/foo"
  end

  x.report("new_mkdir_p - more levels") do
    FileUtils.mkdir_p_new "/tmp/foo/bar/baz"
    FileUtils.rm_rf "/tmp/foo"
  end

  x.compare!
end
```

and copied the method with the "optimization" removed as
`FileUtils.mkdir_p_new`. The results are as below:

```
Warming up --------------------------------------
old mkdir_p - exists    15.914k i/100ms
new_mkdir_p - exists    46.512k i/100ms
Calculating -------------------------------------
old mkdir_p - exists    161.461k (± 3.2%) i/s -    811.614k in   5.032315s
new_mkdir_p - exists    468.192k (± 2.9%) i/s -      2.372M in   5.071225s

Comparison:
new_mkdir_p - exists:   468192.1 i/s
old mkdir_p - exists:   161461.0 i/s - 2.90x  (± 0.00) slower

Warming up --------------------------------------
old mkdir_p - doesnt exist, parent exists
                         2.142k i/100ms
new_mkdir_p - doesnt exist, parent exists
                         1.961k i/100ms
Calculating -------------------------------------
old mkdir_p - doesnt exist, parent exists
                         21.242k (± 6.7%) i/s -    107.100k in   5.069206s
new_mkdir_p - doesnt exist, parent exists
                         19.682k (± 4.2%) i/s -    100.011k in   5.091961s

Comparison:
old mkdir_p - doesnt exist, parent exists:    21241.7 i/s
new_mkdir_p - doesnt exist, parent exists:    19681.7 i/s - same-ish: difference falls within error

Warming up --------------------------------------
old mkdir_p - doesnt exist, parent either
                       945.000  i/100ms
new_mkdir_p - doesnt exist, parent either
                         1.002k i/100ms
Calculating -------------------------------------
old mkdir_p - doesnt exist, parent either
                          9.689k (± 4.4%) i/s -     49.140k in   5.084342s
new_mkdir_p - doesnt exist, parent either
                         10.806k (± 4.6%) i/s -     54.108k in   5.020714s

Comparison:
new_mkdir_p - doesnt exist, parent either:    10806.3 i/s
old mkdir_p - doesnt exist, parent either:     9689.3 i/s - 1.12x  (± 0.00) slower

Warming up --------------------------------------
old mkdir_p - more levels
                       702.000  i/100ms
new_mkdir_p - more levels
                       775.000  i/100ms
Calculating -------------------------------------
old mkdir_p - more levels
                          7.046k (± 3.5%) i/s -     35.802k in   5.087548s
new_mkdir_p - more levels
                          7.685k (± 5.5%) i/s -     38.750k in   5.061351s

Comparison:
new_mkdir_p - more levels:     7685.1 i/s
old mkdir_p - more levels:     7046.4 i/s - same-ish: difference falls within error
```

I think it's better to keep the code simpler is the optimization is not
so clear like in this case.

https://github.com/ruby/fileutils/commit/e842a0e70e
2021-10-14 09:12:16 +09:00
David Rodríguez
d8d97872a1 [ruby/fileutils] Simplify loop to find out segments to be created
Doing it this way is simpler and it doesn't end up adding "/" to the
list of folders, so it doesn't need to be removed later.

https://github.com/ruby/fileutils/commit/df08e124ce
2021-10-14 09:12:15 +09:00
David Rodríguez
058cd3a6df [rubygems/rubygems] Remove unnecessary method
https://github.com/rubygems/rubygems/commit/97241e0ea4
2021-10-13 23:30:13 +09:00