68523 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
e1e3657746
Simplify srcdir fallback 2021-10-18 11:43:50 +09:00
git
0381d10533 * 2021-10-18 [ci skip] 2021-10-18 00:24:20 +09:00
Nobuyoshi Nakada
0871652f21
Not all environment variables can be convertible to IBM-437 2021-10-18 00:23:59 +09:00
Nobuyoshi Nakada
c7eac1be51
Retry hung up tests verbosely 2021-10-17 22:40:31 +09:00
Nobuyoshi Nakada
13716898df Retry hung tests after parallel runs 2021-10-17 16:33:58 +09:00
Nobuyoshi Nakada
478187e9a3 Timeout parallel test worker processes 2021-10-17 16:33:58 +09:00
David CARLIER
1831693c1f haiku build update stack overflow check in libroot (haiku's libc) now 2021-10-17 14:00:59 +09:00
git
82e2443d8b * 2021-10-17 [ci skip] 2021-10-17 01:34:39 +09:00
Nobuyoshi Nakada
5de6e25144
Replace unpack with unpack1 2021-10-17 00:48:45 +09:00
Kazuki Yamaguchi
cc8ff8b50d [ruby/openssl] require Ruby 2.6 or later
Drop support for Ruby 2.3, 2.4, and 2.5.

As of 2021-10, Ruby 2.6 is the oldest version that still receives
security fixes from the Ruby core team, so it doesn't make much sense
to keep code for those ancient versions.

https://github.com/ruby/openssl/commit/3436bd040d
2021-10-16 19:39:13 +09:00
Kazuki Yamaguchi
4991dabdd0 [ruby/openssl] bump version number to 3.0.0.pre
https://github.com/ruby/openssl/commit/baa83a8a57
2021-10-16 18:57:57 +09:00
Kazuki Yamaguchi
cea3c55d58 [ruby/openssl] Ruby/OpenSSL 2.2.1
https://github.com/ruby/openssl/commit/65e7207a07
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi
75e72baba1 [ruby/openssl] Ruby/OpenSSL 2.1.3
https://github.com/ruby/openssl/commit/e8ee01b22c
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi
e36906f9ab [ruby/openssl] test/openssl/test_ssl: use TLS 1.2 for finished_messages on LibreSSL
LibreSSL 2.2.x has a bug in the Finished message handling with TLS 1.3.
This is fixed by LibreSSL 3.3.2.

https://github.com/ruby/openssl/commit/0bea59d245
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi
c1147f7f71 [ruby/openssl] ssl: avoid directly storing String object in NPN callback
On the server side, the serialized list of protocols is stored in
SSL_CTX as a String object reference. We utilize a hidden instance
variable to prevent it from being GC'ed, but this is not enough because
it can also be relocated by GC.compact.

https://github.com/ruby/openssl/commit/5eb68ba778
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi
f6612203fa [ruby/openssl] x509store: explicitly call rb_gc_mark() against Store/StoreContext
We store the reverse reference to the Ruby object in the OpenSSL
struct for use from OpenSSL callback functions. To prevent the Ruby
object from being relocated by GC.compact, we must "pin" it by calling
rb_gc_mark().

https://github.com/ruby/openssl/commit/a6ba9f894f
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi
ca28545b51 [ruby/openssl] ssl: explicitly call rb_gc_mark() against SSLContext/SSLSocket objects
We store the reverse reference to the Ruby object in the OpenSSL
struct for use from OpenSSL callback functions. To prevent the Ruby
object from being relocated by GC.compact, we must "pin" it by calling
rb_gc_mark().

https://github.com/ruby/openssl/commit/022b7ceada
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi
c6c2190c4c [ruby/openssl] digest: load digest library using Kernel#require
The digest library is a default gem now, too. Therefore we can't simply
use rb_require() to load it, but we should use Kernel#require instead.

This change is based on the suggestion by David Rodríguez in
16172612d5 (commitcomment-57778397)

https://github.com/ruby/openssl/commit/157f80794b
2021-10-16 18:34:35 +09:00
Nobuhiro IMAI
f88401f38e [ruby/openssl] fix segv in Timestamp::{Request,Response,TokenInfo}.new
prevent `ossl_ts_*_free()` from calling when `d2i_TS_*_bio()` failed.

https://github.com/ruby/openssl/commit/b29e215786
2021-10-16 18:34:35 +09:00
David Carlier
6dcc74155f [ruby/openssl] ts: libressl build fix warning
TS_time_cb on libressl expects an long long/time_t 64 bits long instead.

https://github.com/ruby/openssl/commit/4c99f577b2
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi
daeb914a52 [ruby/openssl] ssl: temporary lock string buffer while reading
Similarly to SSLSocket#syswrite, the blocking SSLSocket#sysread allows
context switches. We must prevent other threads from modifying the
string buffer.

We can use rb_str_locktmp() and rb_str_unlocktmp() to temporarily
prohibit modification of the string.

https://github.com/ruby/openssl/commit/d38274949f
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi
5828807626 [ruby/openssl] ssl: create a temporary frozen string buffer when writing
Since a blocking SSLSocket#syswrite call allows context switches while
waiting for the underlying socket to be ready, we must freeze the string
buffer to prevent other threads from modifying it.

Reference: https://github.com/ruby/openssl/issues/452

https://github.com/ruby/openssl/commit/aea874bc6e
2021-10-16 18:25:28 +09:00
Nobuyoshi Nakada
ed7ea35d74 [ruby/openssl] Fixed misspellings
[ This is a backport to the 2.1 branch. ]

Fixed misspellings reported at [Bug #16437], for default gems.

(cherry picked from commit ruby/ruby@e68999c82c)

https://github.com/ruby/openssl/commit/0f43789503
2021-10-16 18:25:11 +09:00
Kazuki Yamaguchi
6105ef7629 [ruby/openssl] ssl: add SSLContext#tmp_dh=
Provide a wrapper of SSL_set0_tmp_dh_pkey()/SSL_CTX_set_tmp_dh(), which
sets the DH parameters used for ephemeral DH key exchange.

SSLContext#tmp_dh_callback= already exists for this purpose, as a
wrapper around SSL_CTX_set_tmp_dh_callback(), but it is considered
obsolete and the OpenSSL API is deprecated for future removal. There is
no practical use case where an application needs to use different DH
parameters nowadays. This was originally introduced to support export
grade ciphers.

RDoc for #tmp_dh_callback= is updated to recommend the new #tmp_dh=.

Note that current versions of OpenSSL support automatic ECDHE curve
selection which is enabled by default. SSLContext#tmp_dh= should only be
necessary if you must allow ancient clients which don't support ECDHE.

https://github.com/ruby/openssl/commit/aa43da4f04
2021-10-16 18:19:52 +09:00
Kazuki Yamaguchi
49217086ad [ruby/openssl] ssl: remove private method SSLSocket#tmp_ecdh_callback
Commit ee037e146037 ("ssl: remove SSL::SSLContext#tmp_ecdh_callback",
2020-08-12) forgot to remove the method.

https://github.com/ruby/openssl/commit/bef9ea84e4
2021-10-16 18:19:51 +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
Burdette Lamar
5d975684da
Enhanced RDoc for remainder (#4975)
Treats Numeric#remainder and Integer#remainder.
2021-10-15 16:20:52 -05:00
Jeremy Evans
2a5c3a4d0f Update documentation for String and Symbol to discuss differences
Implements [Feature #14347]
2021-10-15 13:54:03 -07:00
Burdette Lamar
37ea909f42
Enhanced RDoc for divmod (#4973)
Treats:

    Integer#divmod
    Float#divmod
    Numeric#divmod
2021-10-15 12:51:37 -05:00
Burdette Lamar
2043c2e7e4
Enhanced RDoc for numeric.c (#4964)
Treats Integer#% and Float#%.
2021-10-15 11:57:49 -05: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
git
c322069a67 * 2021-10-16 [ci skip] 2021-10-16 01:39:22 +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
Mike Dalessio
9225f3c1c6 [ruby/rdoc] test: add coverage for comment format in a C file
https://github.com/ruby/rdoc/commit/3b8334a796
2021-10-16 01:39:04 +09:00
Nobuyoshi Nakada
19beb028e7
Make explicit opening files 2021-10-15 19:59:14 +09:00
Nobuyoshi Nakada
855db8e9ce
Use __dir__ 2021-10-15 19:42:39 +09:00
Nobuyoshi Nakada
370fff98ce
Prefer require_relative 2021-10-15 18:47:25 +09:00
Sutou Kouhei
027a3379d6 [ruby/zlib] Fix a bug that GZipReader#gets may return incomplete line
See also: https://github.com/ruby/csv/issues/117#issuecomment-933289373

How to reproduce with x.csv.gz in the issue comment:

    Zlib::GzipReader.open("x.csv.gz") do |rio|
      rio.gets(nil, 1024)
      while line = rio.gets(nil, 8192)
        raise line unless line.valid_encoding?
      end
    end

Reported by Dimitrij Denissenko. Thanks!!!

https://github.com/ruby/zlib/commit/b1f182e98f
2021-10-15 15:31:15 +09:00
Nobuyoshi Nakada
679054208e
Use __dir__ 2021-10-15 15:07:31 +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
git
c658834c43 * 2021-10-15 [ci skip] 2021-10-15 01:26:26 +09:00
Nobuyoshi Nakada
e057b9eea9
Prefer the reentrant versions of gmtime and localtime 2021-10-14 23:44:15 +09:00
Kazuhiro NISHIYAMA
fc9f9231cf
Update bundled_gems 2021-10-14 23:17:20 +09:00
Nobuyoshi Nakada
c19685e208
Reap rarely leaked threads 2021-10-14 22:57:45 +09:00
Hiroshi SHIBATA
2fa0d51ac9 [ruby/date] Bump up date version to 3.2.0
https://github.com/ruby/date/commit/e0a4cbc8f6
2021-10-14 21:15:57 +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