summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2024-05-24Revert "[ruby/openssl] Use EVP_Digest{Sign,Verify} when available"Hiroshi SHIBATA
This reverts commit 63f40a5be59ac898e87528630568b7890ffcf5fb.
2024-05-24Revert "[ruby/openssl] Enable HKDF support for LibreSSL 3.6 and later"Hiroshi SHIBATA
This reverts commit b6da54c7219197eacdbfdca53739686f0bb2d06a.
2024-05-24[ruby/openssl] Enable HKDF support for LibreSSL 3.6 and laterTheo Buehler
LibreSSL 3.6 added support for HKDF in EVP. Enable this in ossl_kdf.c. https://github.com/ruby/openssl/commit/9bdd39a7e2
2024-05-24[ruby/openssl] Use EVP_Digest{Sign,Verify} when availableTheo Buehler
LibreSSL 3.4 added EVP_DigestSign() and EVP_DigestVerify(). Use them when available to prepare for the addition of Ed25519 support in LibreSSL 3.7. https://github.com/ruby/openssl/commit/475b2bf766
2024-05-24LibreSSL 3.5 and later provide and need to use ↵Hiroshi SHIBATA
PEM_write_bio_PrivateKey_traditional() Co-authored-by: "Jeremy Evans" <code@jeremyevans.net>
2024-05-23merge revision(s) ae8990aef098410ecc2b5f48fea9d7d171a3c5f6:Hiroshi SHIBATA
Alias init functions The extension library has each initialization function named "Init_" + basename. If multiple extensions have the same base name (such as cgi/escape and erb/escape), the same function will be registered for both names. To fix this conflict, rename the initialization functions under sub directories using using parent names, when statically linking. --- ext/extmk.rb | 16 +++++++++++++++- template/extinit.c.tmpl | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-)
2024-05-23merge revision(s) a4ad6bd9aac564e93219284c912b26a72f9e82fc:Sutou Kouhei
[ruby/fiddle] closure: free resources when an exception is raised in Closure.new GitHub: GH-102 https://github.com/ruby/fiddle/commit/81a8a56239 --- ext/fiddle/closure.c | 56 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 13 deletions(-)
2024-04-23Merge StringIO 3.0.1.2Hiroshi SHIBATA
2023-10-10merge revision(s) ada9f8a9f78b3ccd8a5187775d06f45eb9f636f5: [Backport #18914]U.Nakamura
[ruby/fiddle] closure: follow variable name change GitHub: GH-102 https://github.com/ruby/fiddle/commit/2530496602 --- ext/fiddle/closure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2023-07-25Backport cvar clone bug fix for 19379 to 3.1 (#7889)Eileen M. Uchitelle
* Copy cvar table on clone When a class with a class variable is cloned we need to also copy the cvar cache table from the original table to the clone. I found this bug while working on fixing [Bug #19379]. While this does not fix that bug directly it is still a required change to fix another bug revealed by the fix in https://github.com/ruby/ruby/pull/7265 This needs to be backported to 3.2.x and 3.1.x. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> * Fix cvar caching when class is cloned The class variable cache that was added in https://github.com/ruby/ruby/pull/4544 changed the behavior of class variables on cloned classes. As reported when a class is cloned AND a class variable was set, and the class variable was read from the original class, reading a class variable from the cloned class would return the value from the original class. This was happening because the IC (inline cache) is stored on the ISEQ which is shared between the original and cloned class, therefore they share the cache too. To fix this we are now storing the `cref` in the cache so that we can check if it's equal to the current `cref`. If it's different we don't want to read from the cache. If it's the same we do. Cloned classes don't share the same cref with their original class. This will need to be backported to 3.1 in addition to 3.2 since the bug exists in both versions. We also added a marking function which was missing. Fixes [Bug #19379] Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> * Add missing write barrier We were missing the write barrier for class_value to cref. This should fix the segv we were seeing in http://ci.rvm.jp/logfiles/brlog.trunk-gc-asserts.20230601-165052 Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> --------- Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2023-03-21merge revision(s) 21dced8b01823a991829b66ffdc8ffc635965c76: [Backport #19389]nagachika
[ruby/stringio] [Bug #19389] Fix chomping with longer separator https://github.com/ruby/stringio/commit/eb322a9716 --- ext/stringio/stringio.c | 5 +++-- test/stringio/test_stringio.rb | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-)
2022-11-22Merge CGI-0.3.5Hiroshi SHIBATA
2022-11-05merge revision(s) ↵nagachika
35c794b26d406c39f90e188e3884003fe6aca532,725626d8905fe1ac4a2cf1c3e2db6412bf8f381f,b32a3f1275a8c7748f2134492ce3c532f277d261: [Backport #18964] Fixed by [Bug #18964] --- file.c | 3 --- 1 file changed, 3 deletions(-) [Bug #18964] Update the code range of appended portion --- ext/-test-/econv/append.c | 15 +++++++++++++++ ext/-test-/econv/extconf.rb | 3 +++ ext/-test-/econv/init.c | 11 +++++++++++ transcode.c | 34 ++++++++++++++++++++++++++++++---- 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 ext/-test-/econv/append.c create mode 100644 ext/-test-/econv/extconf.rb create mode 100644 ext/-test-/econv/init.c [Bug #18964] Add test for `rb_econv_append` --- test/-ext-/econv/test_append.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/-ext-/econv/test_append.rb
2022-10-21merge revision(s) 9de11fe796e8caca2d87650278028eb95c1e09a0:nagachika
Quiet if the target is already linked the same source --- ext/extmk.rb | 2 +- tool/ln_sr.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
2022-10-21merge revision(s) e5e6b87e265b95620821f7abac56b5ab90d4c1fd:nagachika
Create temporary file exclusively and clean --- ext/extmk.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
2022-10-21merge revision(s) 6af7212004c0b98f09350b53a032f94f3a1e666c:nagachika
Make extensions under `Gem.extension_api_version` directory --- ext/extmk.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
2022-10-21merge revision(s) c093e7d64545640c8f2e7bb3eb24e3f9e24fb1c5:nagachika
Avoid to symlink under symlink --- ext/extmk.rb | 2 +- tool/ln_sr.rb | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-)
2022-10-21merge revision(s) 78d2be69b500e4552e0e75fdefd26606a0506009:nagachika
Move copying/linking extra files to Makefile so removed by `clean` --- ext/extmk.rb | 81 ++++++++++++++++++++++++----------------- tool/ln_sr.rb | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+), 33 deletions(-) create mode 100755 tool/ln_sr.rb
2022-10-21merge revision(s) ed8c21bbd5071b52d0d0612eadbdad8fe192e974:nagachika
Ensure symlinks to bundled gem with exts have parent dir When configuring with `--disable-rpath` and `--static-linked-ext` (e.g. building for WASI), `extmk.rb` doesn't build exts under bundled gems, and `.bundle/gems/#{gemname}-#{ver}` are not created due to no call of `extmake`. b2491783986084770f6f97552f27b868622730cf starts creating symlink at `.bundle/gems/#{gemname}-#{ver}/lib`, but the parent dir is not created, so configuration aginst debug and rbs gems were failed. --- ext/extmk.rb | 1 + 1 file changed, 1 insertion(+)
2022-10-21merge revision(s) dcbb94d5b9b4a7d0bfde5ba9a5da1ada643a31b7:nagachika
Move timestamps directory for bundled gems --- ext/extmk.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
2022-10-16merge revision(s) d7afaf21f2edfac8a606891868a3c4a7025267bd:nagachika
Move the target directory of bundled gems like as rubygems --- ext/extmk.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
2022-10-16merge revision(s) db3d111c1d1e90b400f1e737ded6a4e4bdf2cec8:nagachika
Bundled gems are expanded under `.bundle/gems` now --- ext/extmk.rb | 13 +++++++------ template/exts.mk.tmpl | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-)
2022-10-15merge revision(s) b2491783986084770f6f97552f27b868622730cf:nagachika
Install gems `lib` directory to build path --- ext/extmk.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
2022-10-15merge revision(s) a2c66f52f402cb58372e271226f3341065561e53:nagachika
Make dependency-free gemspec files The default gems have not been installed yet in the build directory, bundled gems depending on them can not work. As those dependencies should be usable there even without rubygems, make temporary gemspec files without the dependencies, and use them in the build directory. --- ext/extmk.rb | 11 +++++++++++ tool/gem-unpack.rb | 4 ++++ 2 files changed, 15 insertions(+)
2022-09-25merge revision(s) cf7d07570f50ef9c16007019afcff11ba6500d70: [Backport #18938]nagachika
Dump non-ASCII char as unsigned Non-ASCII code may be negative on platforms plain char is signed. --- ext/objspace/objspace_dump.c | 2 +- test/objspace/test_objspace.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-)
2022-09-17Merge openssl-3.0.1Kazuki Yamaguchi
The changes can be found at: https://github.com/ruby/openssl/compare/v3.0.0...v3.0.1
2022-09-04Backport https://github.com/ruby/ruby/pull/6193Hiroshi SHIBATA
Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
2022-05-18Merge Psych-4.0.4Hiroshi SHIBATA
2022-05-05merge revision(s) 1cbdedec895070df1df96d05370cf8da084ab6fa:nagachika
[ruby/zlib] Mask checksums to lower 32bits Upper bits affect the result of `crc32` in zlib 1.2.12. https://github.com/ruby/zlib/commit/9ab6d04af1 --- ext/zlib/zlib.c | 12 +++++++++--- test/zlib/test_zlib.rb | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-)
2022-05-01remove bundled zlib patch file for mswin platform. It's already applied at ↵nagachika
zlib-1.2.12.
2022-02-01merge revision(s) ↵NARUSE, Yui
f27eb8148f5a72bbacfebfecc7de9305471bb5c9,d75f7078c831d45ab5ba2fae4fbb308d01a21e46,d5836db1b398a7936b0461b3011db66f6cc8c490: [Backport #18443] Sync io-console gem. --- ext/io/console/console.c | 8 ++++++-- test/io/console/test_io_console.rb | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) [ruby/io-console] bump up to 0.5.11 https://github.com/ruby/io-console/commit/ad3805200c --- ext/io/console/io-console.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Fix `Leaked file descriptor: TestIO_Console#test_console_kw` ``` Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty> ``` --- test/io/console/test_io_console.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
2022-02-01Revert "Fix console.c usage of `rb_io_wait`."NARUSE, Yui
This reverts commit aa3b2c81c8de2e70bd100e92436f15c03523eaf7.
2022-01-31Fix console.c usage of `rb_io_wait`.Samuel Williams
2021-12-25Prevent installing zlib libraryNARUSE, Yui
(cherry picked from commit 82c8acbcfd3197e19620dc6024d08c85ea99a05b)
2021-12-25[ruby/io-console] bump up to 0.5.10Nobuyoshi Nakada
https://github.com/ruby/io-console/commit/806c65e22b (cherry picked from commit 8247b193c0dd06db9ea56812954dda8fed89458d)
2021-12-25[ruby/io-console] No longer support dead versionsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/e9478509e9 (cherry picked from commit 9368fa6c3073d5fe4380a5e84eb59f7cec2ce62c)
2021-12-25[ruby/openssl] Ruby/OpenSSL 3.0.0Kazuki Yamaguchi
https://github.com/ruby/openssl/commit/bff4080091
2021-12-25Prefer to use RTEST when checking result of `rb_io_wait`. (#5341)Samuel Williams
* Prefer to use RTEST when checking result of `rb_io_wait`. * Consistently use false for signifying no events ready. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2021-12-24Import digest v3.1.0 from ruby/digestAkinori MUSHA
2021-12-24[ruby/readline-ext] Bump version to 0.1.4Hiroshi SHIBATA
https://github.com/ruby/readline-ext/commit/6f86713b19
2021-12-24[ruby/bigdecimal] Remove unused variableKenta Murata
https://github.com/ruby/bigdecimal/commit/ac7daa5f15
2021-12-24[ruby/bigdecimal] Version 3.1.1Kenta Murata
https://github.com/ruby/bigdecimal/commit/2ef67c2cc7
2021-12-24[ruby/bigdecimal] Fix the result precision of BigDecimal#divmodKenta Murata
https://github.com/ruby/bigdecimal/commit/a32f6cb9e2
2021-12-24[ruby/bigdecimal] Version 3.1.0Kenta Murata
https://github.com/ruby/bigdecimal/commit/c3453d2b97
2021-12-24[ruby/bigdecimal] Enhanced RDoc for BigDecimal ↵Burdette Lamar
(https://github.com/ruby/bigdecimal/pull/209) * Enhanced RDoc for BigDecimal * Update ext/bigdecimal/bigdecimal.c Remove the instance number of `Float::DIG`. * Update ext/bigdecimal/bigdecimal.c Add BigDecimal call-seq without ndigits. * Update ext/bigdecimal/bigdecimal.c Replace the word sum with value or result in the description of BigDecimal(). * Update ext/bigdecimal/bigdecimal.c Remove the instance value of Float::DIG. * Update ext/bigdecimal/bigdecimal.c Fix mis-description of precision * Update ext/bigdecimal/bigdecimal.c Fix the description of precision determination * Update ext/bigdecimal/bigdecimal.c Add the description of the precision in the Rational case. https://github.com/ruby/bigdecimal/commit/acabb132a4 Co-authored-by: Kenta Murata <3959+mrkn@users.noreply.github.com>
2021-12-24[ruby/bigdecimal] Let BigDecimal#quo accept precisionKenta Murata
Fix GH-214. https://github.com/ruby/bigdecimal/commit/13e0e93f37
2021-12-24[ruby/bigdecimal] Add TODO commentKenta Murata
https://github.com/ruby/bigdecimal/commit/ef9cf4e69e
2021-12-24[ruby/bigdecimal] Allow passing both float and precision in BigDecimal#divKenta Murata
Fix GH-212. https://github.com/ruby/bigdecimal/commit/900bb7fcf5
2021-12-24[ruby/bigdecimal] Improve extconf to allow using bigdecimal as a git gemJean Boussier
e.g. ``` gem "bigdecimal", github: "ruby/bigdecimal" ``` It would fail because bundler regenerates the `gemspec`, so `bigdecimal_version` is gone. https://github.com/ruby/bigdecimal/commit/bccaa66f2c
2021-12-24[ruby/bigdecimal] Add BigDecimal#precision_scaleKenta Murata
https://github.com/ruby/bigdecimal/commit/c019caeaba