summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2021-11-25[ruby/win32ole] Fix typos [ci skip]Nobuyoshi Nakada
https://github.com/ruby/win32ole/commit/8d46bd0c93 Notes: Merged: https://github.com/ruby/ruby/pull/5175
2021-11-25[ruby/win32ole] LICENSEHiroshi SHIBATA
https://github.com/ruby/win32ole/commit/62fd78078b Notes: Merged: https://github.com/ruby/ruby/pull/5175
2021-11-25Keep the generated source files when clean [Bug #18363]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5174
2021-11-24[ruby/zlib] [Bug #18358] Fix crash in zlib when in progressPeter Zhu
When Zlib::Inflate#inflate or Zlib::Deflate#deflate is called recursively inside the block, a crash can occur because of an use-after-free bug. https://github.com/ruby/zlib/commit/50fb8a0338
2021-11-24[ruby/cgi] Fix integer overflowNobuyoshi Nakada
Make use of the check in rb_alloc_tmp_buffer2. https://hackerone.com/reports/1328463 https://github.com/ruby/cgi/commit/c728632c1c
2021-11-22Avoid assert failure when NULL EC is expectedAlan Wu
After 5680c38c75aeb5cbd219aafa8eb48c315f287d97, postponed job APIs now expect to be called on native threads not managed by Ruby and handles getting a NULL execution context. However, in debug builds the change runs into an assertion failure with GET_EC() which asserts that EC is non-NULL. Avoid the assertion failure by passing `false` for `expect_ec` instead as the intention is to handle when there is no EC. Add a test from John Crepezzi and John Hawthorn to exercise this situation. See GH-4108 See GH-5094 [Bug #17573] Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: John Crepezzi <john.crepezzi@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/5156 Merged-By: XrXr
2021-11-21Update dependenciesNobuyoshi Nakada
2021-11-18[ruby/date] Bump version to 3.2.2Hiroshi SHIBATA
https://github.com/ruby/date/commit/21d91c5f4f
2021-11-18[ruby/date] Expose Date::VERSIONJean Boussier
An almost universal convention for gems is to expose `Namespace::VERSION` which makes it mcuh easier when debugging etc. Many gems extracted from ruby don't do this, even though it would be even more useful because they ship with ruby, so it's less clear which version it is. https://github.com/ruby/date/commit/fef7ec18d8
2021-11-17Prevent "already initialized constant Digest::VERSION"Yusuke Endoh
http://rubyci.s3.amazonaws.com/ubuntu1804/ruby-master/log/20211117T033003Z.log.html.gz ``` installing default gems from ext: /home/chkbuild/chkbuild/tmp/build/20211117T033003Z/lib/ruby/gems/3.1.0 /home/chkbuild/chkbuild/tmp/build/20211117T033003Z/ruby/ext/digest/lib/digest/version.rb:4: warning: already initialized constant Digest::VERSION /home/chkbuild/chkbuild/tmp/build/20211117T033003Z/ruby/.ext/common/digest/version.rb:4: warning: previous definition of VERSION was here ``` This hack is copied from ext/psych/psych.gemspec
2021-11-17ext/io/wait/depend: make it work for Ruby 3.1.0-devYusuke Endoh
Reverts https://github.com/ruby/io-wait/commit/2eb3841e9c8f3279955253a93d3db98b80787548 because it fails on "update-deps" check in the ruby/ruby CI. https://github.com/ruby/ruby/runs/4230891140?check_suite_focus=true ``` diff --git a/ext/io/wait/depend b/ext/io/wait/depend index 7b314b9..449e9fe 100644 --- a/ext/io/wait/depend +++ b/ext/io/wait/depend ... ``` Maybe now it does not work on Ruby 2.6. This file must be changed for each Ruby version. I have no good idea to fix this issue.
2021-11-16[ruby/date] check_limit: also handle symbolsJean Boussier
https://github.com/ruby/date/commit/376c65942b
2021-11-16[ruby/date] `Date._<format>(nil)` should return an empty HashJean Boussier
Fix: https://github.com/ruby/date/issues/39 This is how versions previous to 3.2.1 behaved and Active Support currently rely on this behavior. https://github.com/rails/rails/blob/90357af08048ef5076730505f6e7b14a81f33d0c/activesupport/lib/active_support/values/time_zone.rb#L383-L384 Any Rails application upgrading to date `3.2.1` might run into unexpected errors. https://github.com/ruby/date/commit/8f2d7a0c7e
2021-11-16[ruby/nkf] Fix a typo [ci skip]Nobuyoshi Nakada
https://github.com/ruby/nkf/commit/18c118c83c
2021-11-16[ruby/date] Add length limit option for methods that parses date stringsYusuke Endoh
`Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse` but also the following methods are changed. * Date._parse * Date.parse * DateTime.parse * Date._iso8601 * Date.iso8601 * DateTime.iso8601 * Date._rfc3339 * Date.rfc3339 * DateTime.rfc3339 * Date._xmlschema * Date.xmlschema * DateTime.xmlschema * Date._rfc2822 * Date.rfc2822 * DateTime.rfc2822 * Date._rfc822 * Date.rfc822 * DateTime.rfc822 * Date._jisx0301 * Date.jisx0301 * DateTime.jisx0301 https://github.com/ruby/date/commit/3959accef8
2021-11-16[ruby/io-wait] Fix dependency for ruby 2.6Nobuyoshi Nakada
https://github.com/ruby/io-wait/commit/2eb3841e9c
2021-11-16[ruby/io-wait] Allow earlier versionsNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/1060f9348c
2021-11-16[ruby/io-wait] Fix backward compatibility with earlier versionsNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/898248931f
2021-11-16Merge digest-3.0.3.pre3 and ↵Hiroshi SHIBATA
https://github.com/ruby/digest/commit/efd76821b8a467c193c753104c29b476debbb2c9
2021-11-16[ruby/digest] Abort loading if being loaded by gem/bundle pre Ruby 3.0.3Akinori MUSHA
https://github.com/ruby/digest/commit/efd76821b8
2021-11-16[ruby/digest] Avoid null pointer subtraction in digest/md5xtkoba
Fixes warning on Clang 13. Fixes [Bug #18076] https://github.com/ruby/digest/commit/32135c7487
2021-11-08[Feature #18290] Remove all usages of rb_gc_force_recyclePeter Zhu
This commit removes usages of rb_gc_force_recycle since it is a burden to maintain and makes changes to the GC difficult. Notes: Merged: https://github.com/ruby/ruby/pull/4363
2021-11-08Prefer ANSI-style prototypes over old K&R-style definitionsNobuyoshi Nakada
2021-11-08Fix filename typo [Bug #18140]Nobuyoshi Nakada
2021-11-03[ruby/openssl] Fix typos [ci skip]Nobuyoshi Nakada
https://github.com/ruby/openssl/commit/708ebf2f7a
2021-11-02ext/socket/extconf.rb: Fix the chech if if_indextoname is availableYusuke Endoh
The check had not work because "headers" were not passed.
2021-11-02Fix typosNobuyoshi Nakada
2021-11-01[ruby/openssl] x509name: improve docs for X509::NameKazuki Yamaguchi
Add docs for X509::Name.parse_openssl and X509::Name.parse_rfc2253, which are currently undocumented despite being widely used. Small changes are also made to #to_s and the class description to recommend using RFC 2253-based methods. Fixes: https://github.com/ruby/openssl/issues/470 https://github.com/ruby/openssl/commit/74041a35d4
2021-11-01[ruby/openssl] ssl: disallow reading/writing to unstarted SSL socketKazuki Yamaguchi
OpenSSL::SSL::SSLSocket allowed #read and #write to be called before an SSL/TLS handshake is completed. They passed unencrypted data to the underlying socket. This behavior is very odd to have in this library. A verbose mode warning "SSL session is not started yet" was emitted whenever this happened. It also didn't behave well with OpenSSL::Buffering. Let's just get rid of it. Fixes: https://github.com/ruby/openssl/issues/9 https://github.com/ruby/openssl/commit/bf780748b3
2021-10-25[Feature #18239] Implement VWA for stringsPeter Zhu
This commit adds support for embedded strings with variable capacity and uses Variable Width Allocation to allocate strings. Notes: Merged: https://github.com/ruby/ruby/pull/4933
2021-10-25Make Coverage suspendable (#4856)Yusuke Endoh
* Make Coverage suspendable Add `Coverage.suspend`, `Coverage.resume` and some methods. [Feature #18176] [ruby-core:105321] Notes: Merged-By: mame <mame@ruby-lang.org>
2021-10-25[ruby/openssl] bn: expand BIGNUM_RAND and BIGNUM_RAND_RANGE macrosKazuki Yamaguchi
Now that BN.pseudo_rand{,_range} are alias, those macros are only used once. Let's expand the macros for better readability. https://github.com/ruby/openssl/commit/7c2fc00dee
2021-10-25[ruby/openssl] bn: make BN.pseudo_rand{,_range} an alias of BN.rand{,_range}Kazuki Yamaguchi
BN_pseudo_rand() and BN_pseudo_rand_range() are deprecated in OpenSSL 3.0. Since they are identical to their non-'pseudo' version anyway, let's make them alias. https://github.com/ruby/openssl/commit/2d34e85ddf
2021-10-25[ruby/openssl] pkey, ssl: use EVP_PKEY_eq() instead of EVP_PKEY_cmp()Kazuki Yamaguchi
OpenSSL 3.0 renamed EVP_PKEY_cmp() to EVP_PKEY_eq() because that was a confusing name. https://github.com/ruby/openssl/commit/d42bd7fcdb
2021-10-25[ruby/openssl] pkey/ec: use EC_GROUP_free() instead of EC_GROUP_clear_free()Kazuki Yamaguchi
EC_GROUP_clear_free() is deprecated in OpenSSL 3.0. EC_GROUP does not include any sensitive data, so we can safely use EC_GROUP_free() instead. https://github.com/ruby/openssl/commit/e93a5fdffc
2021-10-25[ruby/openssl] pkey/ec: deprecate PKey::EC::Point#make_affine! and make it a ↵Kazuki Yamaguchi
no-op It converts the internal representation of the point object to the affine coordinate system. However, it had no real use case because the difference in the internal representation has not been visible from Ruby/OpenSSL at all. EC_POINT_make_affine() is marked as deprecated in OpenSSL 3.0. https://github.com/ruby/openssl/commit/e2cc81fef7
2021-10-25[ruby/openssl] hmac: use EVP_MD_CTX_get_pkey_ctx() instead of ↵Kazuki Yamaguchi
EVP_MD_CTX_pkey_ctx() OpenSSL 3.0 renamed EVP_MD_CTX_pkey_ctx() to include "get" in the function name. Adjust compatibility macro so that we can use the new function name for all OpenSSL 1.0.2-3.0. https://github.com/ruby/openssl/commit/c106d888c6
2021-10-25[ruby/openssl] digest: use EVP_MD_CTX_get0_md() instead of EVP_MD_CTX_md() ↵Kazuki Yamaguchi
if exists The function was renamed in OpenSSL 3.0 due to the change of the lifetime of EVP_MD objects. They are no longer necessarily statically allocated and can be reference-counted -- when an EVP_MD_CTX is free'd, the associated EVP_MD can also become inaccessible. Currently Ruby/OpenSSL only handles builtin algorithms, so no special handling is needed except for adapting to the rename. https://github.com/ruby/openssl/commit/0a253027e6
2021-10-25[ruby/openssl] bn: use BN_check_prime() in OpenSSL::BN#prime{,_fasttest}?Kazuki Yamaguchi
In OpenSSL 3.0, BN_is_prime_ex() and BN_is_prime_fasttest_ex() are deprecated in favor of BN_check_prime(). https://github.com/ruby/openssl/commit/90d51ef510
2021-10-25[ruby/openssl] ssl: use SSL_get_rbio() to check if SSL is started or notKazuki Yamaguchi
Use SSL_get_rbio() instead of SSL_get_fd(). SSL_get_fd() internally calls SSL_get_rbio() and it's enough for our purpose. In OpenSSL 3.0, SSL_get_fd() leaves an entry in the OpenSSL error queue if BIO has not been set up yet, and we would have to clean it up. https://github.com/ruby/openssl/commit/e95ee24867
2021-10-25[ruby/openssl] ssl: use SSL_CTX_load_verify_{file,dir}() if availableKazuki Yamaguchi
SSL_CTX_load_verify_locations() is deprecated in OpenSSL 3.0 and replaced with those two separate functions. Use them if they exist. https://github.com/ruby/openssl/commit/5375a55ffc
2021-10-25[ruby/openssl] ts: use TS_VERIFY_CTX_set_certs instead of ↵Kazuki Yamaguchi
TS_VERIFY_CTS_set_certs OpenSSL 3.0 fixed the typo in the function name and replaced the current 'CTS' version with a macro. https://github.com/ruby/openssl/commit/2be6779b08
2021-10-25[ruby/openssl] ossl.c: use ERR_get_error_all() if availableKazuki Yamaguchi
OpenSSL 3.0 deprecated ERR_get_error_line_data() in favor of ERR_get_error_all(), as part of the error queue structure changes. https://github.com/ruby/openssl/commit/8e98d2ecc8
2021-10-25[ruby/openssl] ext/openssl/ossl.h: add helper macros for OpenSSL/LibreSSL ↵Kazuki Yamaguchi
versions Add following convenient macros: - OSSL_IS_LIBRESSL - OSSL_OPENSSL_PREREQ(maj, min, pat) - OSSL_LIBRESSL_PREREQ(maj, min, pat) https://github.com/ruby/openssl/commit/00abee791d
2021-10-24[flori/json] Bump version to v2.6.1Hiroshi SHIBATA
https://github.com/flori/json/commit/2db5894cfa
2021-10-24[flori/json] Bump JSON::VERSION to 2.6.0.Josef Šimánek
https://github.com/flori/json/commit/da94d9f059
2021-10-24[ruby/psych] Prefer `require_relative` for internal requiresDavid Rodríguez
https://github.com/ruby/psych/commit/a0f55ee85a
2021-10-24[ruby/psych] Add stringio as a dependency.Josef Šimánek
https://github.com/ruby/psych/commit/86e3049579
2021-10-24[ruby/strscan] Bump versionSutou Kouhei
If we use the same version as the default strscan gem in Ruby, "gem install" doesn't extract .gem. It fails "gem install" because "gem install" can't find ext/strscan/ to be built. https://github.com/ruby/strscan/commit/3ceafa6cdc Notes: Merged: https://github.com/ruby/ruby/pull/5011
2021-10-23[ruby/openssl] Raise an exception if the IO object passed to SSLSocket isn't ↵Aaron Patterson
a file SSLSocket#connect eventually calls `GetOpenFile` in order to get the underlying file descriptor for the IO object passed in on initialization. `GetOpenFile` assumes that the Ruby object passed in is a T_FILE object and just casts it to a T_FILE without any checks. If you pass an object that *isn't* a T_FILE to that function, the program will segv. Since we assume the IO object is a file in the `connect` method, this commit adds a `CheckType` in the initialize method to ensure that the IO object is actually a T_FILE. If the object *isn't* a T_FILE, this class will segv on `connect`, so I think this is a backwards compatible change. https://github.com/ruby/openssl/commit/919fa44ec2