From 947e5baa8c24cdf2f2d146005e9c91a5733f80f6 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 26 Oct 2025 20:01:08 -0500 Subject: [PATCH 01/12] [ruby/stringio] [DOC] Tweaks for StringIO.closed_write? (https://github.com/ruby/stringio/pull/153) https://github.com/ruby/stringio/commit/3e9d576441 Co-authored-by: Sutou Kouhei --- ext/stringio/stringio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 0dbf1fa3ec0918..b24ab3f5817187 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -651,7 +651,14 @@ strio_closed_read(VALUE self) * call-seq: * closed_write? -> true or false * - * Returns +true+ if +self+ is closed for writing, +false+ otherwise. + * Returns whether +self+ is closed for writing: + * + * strio = StringIO.new + * strio.closed_write? # => false + * strio.close_write + * strio.closed_write? # => true + * + * Related: StringIO#close_write, StringIO#closed?, StringIO#closed_read?. */ static VALUE strio_closed_write(VALUE self) From daaa09bcc2c803ed52f744207d6f951d5b363226 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 26 Oct 2025 20:01:33 -0500 Subject: [PATCH 02/12] [ruby/stringio] [DOC] Tweaks for StringIO.closed_read? (https://github.com/ruby/stringio/pull/152) https://github.com/ruby/stringio/commit/7ded426718 --- ext/stringio/stringio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index b24ab3f5817187..d593508e46b605 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -637,7 +637,14 @@ strio_closed(VALUE self) * call-seq: * closed_read? -> true or false * - * Returns +true+ if +self+ is closed for reading, +false+ otherwise. + * Returns whether +self+ is closed for reading: + * + * strio = StringIO.new + * strio.closed_read? # => false + * strio.close_read + * strio.closed_read? # => true + * + * Related: StringIO#closed?, StringIO#closed_write?, StringIO#close_read. */ static VALUE strio_closed_read(VALUE self) From fcf8b10b3c674eecf16c14fa6ee7f4211fa3b673 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 26 Oct 2025 20:02:02 -0500 Subject: [PATCH 03/12] [ruby/stringio] [DOC] Tweaks for StringIO#close_read (https://github.com/ruby/stringio/pull/149) https://github.com/ruby/stringio/commit/11995db341 --- ext/stringio/stringio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index d593508e46b605..3bb2247fb038a2 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -572,9 +572,16 @@ strio_close(VALUE self) * call-seq: * close_read -> nil * - * Closes +self+ for reading; closed-write setting remains unchanged. + * Closes +self+ for reading; + * closed-write setting remains unchanged; + * returns +nil+: * - * Raises IOError if reading is attempted. + * strio = StringIO.new + * strio.closed_read? # => false + * strio.close_read # => nil + * strio.closed_read? # => true + * strio.closed_write? # => false + * strio.read # Raises IOError: not opened for reading * * Related: StringIO#close, StringIO#close_write. */ From 4bd9cbd3eba28c855efa0e669ea5be302224e338 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 27 Oct 2025 10:14:33 +0900 Subject: [PATCH 04/12] Omit unknown DNS issue of macOS 26.1 beta ``` TestResolvDNS#test_no_server: Test::Unit::ProxyError: Timeout::Error /path/to/ruby/test/resolv/test_dns.rb:531:in 'TestResolvDNS#test_no_server' ``` --- test/resolv/test_dns.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb index 87b3bf9f37a927..2bb8061edbd1ac 100644 --- a/test/resolv/test_dns.rb +++ b/test/resolv/test_dns.rb @@ -525,6 +525,8 @@ def test_no_server if RUBY_PLATFORM.match?(/mingw/) # cannot repo locally omit 'Timeout Error on MinGW CI' + elsif macos?(26,1) + omit 'Timeout Error on macOS 26.1+' else raise Timeout::Error end From 342dfd780bbc0bf1308fe37a80fa482339811927 Mon Sep 17 00:00:00 2001 From: fukunori03 <43785209+fukunori03@users.noreply.github.com> Date: Wed, 12 Feb 2025 14:57:28 +0000 Subject: [PATCH 05/12] [ruby/resolv] win32/resolv: fix loading of `NV Domain` https://github.com/ruby/resolv/commit/da14f1f2fc --- ext/win32/lib/win32/resolv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/win32/lib/win32/resolv.rb b/ext/win32/lib/win32/resolv.rb index 67762da375af39..226de7cba36769 100644 --- a/ext/win32/lib/win32/resolv.rb +++ b/ext/win32/lib/win32/resolv.rb @@ -82,7 +82,7 @@ def get_info nvdom = get_item_property(TCPIP_NT, 'NV Domain') unless nvdom.empty? - @search = [ nvdom ] + search = [ nvdom ] udmnd = get_item_property(TCPIP_NT, 'UseDomainNameDevolution').to_i if udmnd != 0 if /^\w+\./ =~ nvdom From a1a3857ccd71d9e97f7d6c3c9999969d0ab56b6b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 23 Oct 2025 09:31:45 +0900 Subject: [PATCH 06/12] [ruby/win32-registry] Use pathspecs to select needed files in the gem file Exclude other git management files too. https://github.com/ruby/win32-registry/commit/3be0188111 --- ext/win32/win32-registry.gemspec | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ext/win32/win32-registry.gemspec b/ext/win32/win32-registry.gemspec index d747daf458ddf1..a690dd5525ed14 100644 --- a/ext/win32/win32-registry.gemspec +++ b/ext/win32/win32-registry.gemspec @@ -17,13 +17,10 @@ Gem::Specification.new do |spec| # The `git ls-files -z` loads the files in the RubyGem that have been added into git. excludes = %w[ bin/ test/ spec/ features/ rakelib/ - .git .github .mailmap appveyor Rakefile Gemfile + .git* .mailmap appveyor Rakefile Gemfile ] - spec.files = Dir.chdir(__dir__) do - `git ls-files -z`.split("\x0").reject do |f| - File.identical?(f, __FILE__) || f.start_with?(*excludes) - end - end + git_files = %w[git ls-files -z --] + excludes.map {|x| ":^/#{x}"} + spec.files = IO.popen(git_files, chdir: __dir__, &:read).split("\x0") spec.bindir = "exe" spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] From 2dd01c8f5c58faf084061ff687fb5f3d6a2cd264 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 26 Oct 2025 23:22:53 -0500 Subject: [PATCH 07/12] [ruby/stringio] [DOC] Tweaks for StringIO#close_write (https://github.com/ruby/stringio/pull/150) https://github.com/ruby/stringio/commit/ea6e36f797 Co-authored-by: Sutou Kouhei --- ext/stringio/stringio.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 3bb2247fb038a2..50aea7642ece92 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -600,11 +600,16 @@ strio_close_read(VALUE self) * call-seq: * close_write -> nil * - * Closes +self+ for writing; closed-read setting remains unchanged. + * Closes +self+ for writing; closed-read setting remains unchanged; returns +nil+: * - * Raises IOError if writing is attempted. + * strio = StringIO.new + * strio.closed_write? # => false + * strio.close_write # => nil + * strio.closed_write? # => true + * strio.closed_read? # => false + * strio.write('foo') # Raises IOError: not opened for writing * - * Related: StringIO#close, StringIO#close_read. + * Related: StringIO#close, StringIO#close_read, StringIO#closed_write?. */ static VALUE strio_close_write(VALUE self) From e221a4b73e2adb5d5d9c383e8f6be7a455e036f0 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 26 Oct 2025 23:24:00 -0500 Subject: [PATCH 08/12] [ruby/stringio] [DOC] Doc for StringIO#each (https://github.com/ruby/stringio/pull/154) https://github.com/ruby/stringio/commit/eca2588274 --- ext/stringio/stringio.c | 193 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 187 insertions(+), 6 deletions(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 50aea7642ece92..3c842265af2630 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -1462,15 +1462,177 @@ strio_readline(int argc, VALUE *argv, VALUE self) } /* + * :markup: markdown + * * call-seq: * each_line(sep = $/, chomp: false) {|line| ... } -> self * each_line(limit, chomp: false) {|line| ... } -> self * each_line(sep, limit, chomp: false) {|line| ... } -> self * - * Calls the block with each remaining line read from the stream; - * does nothing if already at end-of-file; - * returns +self+. - * See {Line IO}[rdoc-ref:IO@Line+IO]. + * With a block given calls the block with each remaining line (see "Position" below) in the stream; + * returns `self`. + * + * Leaves stream position as end-of-stream. + * + * **No Arguments** + * + * With no arguments given, + * reads lines using the default record separator global variable `$/`, whose initial value is `"\n"`. + * + * ``` + * strio = StringIO.new(TEXT) + * strio.each_line {|line| p line } + * strio.eof? # => true + * ``` + * + * Output: + * + * ``` + * "First line\n" + * "Second line\n" + * "\n" + * "Fourth line\n" + * "Fifth line\n" + * ``` + * + * **Argument `sep`** + * + * With only string argument `sep` given, + * reads lines using that string as the record separator: + * + * ``` + * strio = StringIO.new(TEXT) + * strio.each_line(' ') {|line| p line } + * ``` + * + * Output: + * + * ``` + * "First " + * "line\nSecond " + * "line\n\nFourth " + * "line\nFifth " + * "line\n" + * ``` + * + * **Argument `limit`** + * + * With only integer argument `limit` given, + * reads lines using the default record separator global variable `$/`, whose initial value is `"\n"`; + * also limits the size (in characters) of each line to the given limit: + * + * ``` + * strio = StringIO.new(TEXT) + * strio.each_line(10) {|line| p line } + * ``` + * + * Output: + * + * ``` + * "First line" + * "\n" + * "Second lin" + * "e\n" + * "\n" + * "Fourth lin" + * "e\n" + * "Fifth line" + * "\n" + * ``` + * **Arguments `sep` and `limit`** + * + * With arguments `sep` and `limit` both given, + * honors both: + * + * ``` + * strio = StringIO.new(TEXT) + * strio.each_line(' ', 10) {|line| p line } + * ``` + * + * Output: + * + * ``` + * "First " + * "line\nSecon" + * "d " + * "line\n\nFour" + * "th " + * "line\nFifth" + * " " + * "line\n" + * ``` + * + * **Position** + * + * As stated above, method `each` _remaining_ line in the stream. + * + * In the examples above each `strio` object starts with its position at beginning-of-stream; + * but in other cases the position may be anywhere (see StringIO#pos): + * + * ``` + * strio = StringIO.new(TEXT) + * strio.pos = 30 # Set stream position to character 30. + * strio.each_line {|line| p line } + * ``` + * + * Output: + * + * ``` + * " line\n" + * "Fifth line\n" + * ``` + * + * **Special Record Separators** + * + * Like some methds in class `IO`, StringIO.each honors two special record separators; + * see {Special Line Separators}[rdoc-ref:IO@Special+Line+Separator+Values]. + * + * ``` + * strio = StringIO.new(TEXT) + * strio.each_line('') {|line| p line } # Read as paragraphs (separated by blank lines). + * ``` + * + * Output: + * + * ``` + * "First line\nSecond line\n\n" + * "Fourth line\nFifth line\n" + * ``` + * + * ``` + * strio = StringIO.new(TEXT) + * strio.each_line(nil) {|line| p line } # "Slurp"; read it all. + * ``` + * + * Output: + * + * ``` + * "First line\nSecond line\n\nFourth line\nFifth line\n" + * ``` + * + * **Keyword Argument `chomp`** + * + * With keyword argument `chomp` given as `true` (the default is `false`), + * removes trailing newline (if any) from each line: + * + * ``` + * strio = StringIO.new(TEXT) + * strio.each_line(chomp: true) {|line| p line } + * ``` + * + * Output: + * + * ``` + * "First line" + * "Second line" + * "" + * "Fourth line" + * "Fifth line" + * ``` + * + * With no block given, returns a new {Enumerator}[rdoc-ref:Enumerator]. + * + * Related: StringIO.each_byte, StringIO.each_char, StringIO.each_codepoint. */ static VALUE strio_each(int argc, VALUE *argv, VALUE self) @@ -1969,15 +2131,34 @@ strio_set_encoding_by_bom(VALUE self) } /* + * :markup: markdown + * * \IO streams for strings, with access similar to * {IO}[rdoc-ref:IO]; * see {IO}[rdoc-ref:IO]. * - * === About the Examples + * ### About the Examples * * Examples on this page assume that \StringIO has been required: * - * require 'stringio' + * ``` + * require 'stringio' + * ``` + * + * And that these constants have been defined: + * + * ``` + * TEXT = < Date: Tue, 21 Oct 2025 10:23:33 +0100 Subject: [PATCH 09/12] [ruby/openssl] Update link to OpenSSL configuration file docs https://github.com/ruby/openssl/commit/02ff964114 --- ext/openssl/ossl_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/openssl/ossl_config.c b/ext/openssl/ossl_config.c index ee2ff6786fbb28..9be5fe6f6320dc 100644 --- a/ext/openssl/ossl_config.c +++ b/ext/openssl/ossl_config.c @@ -426,7 +426,7 @@ Init_ossl_config(void) * configuration. See the value of OpenSSL::Config::DEFAULT_CONFIG_FILE for * the location of the file for your host. * - * See also http://www.openssl.org/docs/apps/config.html + * See also https://docs.openssl.org/master/man5/config/ */ cConfig = rb_define_class_under(mOSSL, "Config", rb_cObject); From db59619ce5f7edd2ea0fdf60f29cfed466628987 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 27 Oct 2025 10:41:05 +0900 Subject: [PATCH 10/12] [ruby/rubygems] Fixup https://github.com/ruby/rubygems/commit/9b3a5a8ae9cd https://github.com/ruby/rubygems/commit/8f6eb4ac64 --- spec/bundler/other/major_deprecation_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb index 947800be22bad1..dc96fb852a8be4 100644 --- a/spec/bundler/other/major_deprecation_spec.rb +++ b/spec/bundler/other/major_deprecation_spec.rb @@ -598,7 +598,7 @@ L end - it "raises a helpful error" do + it "warns a helpful error" do bundle "install", raise_on_error: false expect(err).to include("Found x64-mingw32 in lockfile, which is deprecated and will be removed in the future.") From b839deec4914b096988d44016c37737bc7d1254f Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 21 Oct 2025 14:10:40 -0700 Subject: [PATCH 11/12] [ruby/openssl] Check NULL values for deprecated EVP_PKEY_get0() functions In OpenSSL <= 1.1.1, EVP_PKEY_get0() always returned a valid object, so a NULL check was not necessary. In OpenSSL 3.0, the function can return NULL (https://docs.openssl.org/3.0/man7/migration_guide/#deprecated-function-mappings), so guard against this issue. https://github.com/ruby/openssl/commit/dc90b9c51e --- ext/openssl/ossl_pkey_dh.c | 2 ++ ext/openssl/ossl_pkey_dsa.c | 2 ++ ext/openssl/ossl_pkey_ec.c | 2 ++ ext/openssl/ossl_pkey_rsa.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c index 77082d5c348acb..561007fec8b058 100644 --- a/ext/openssl/ossl_pkey_dh.c +++ b/ext/openssl/ossl_pkey_dh.c @@ -21,6 +21,8 @@ EVP_PKEY *_pkey; \ GetPKeyDH((obj), _pkey); \ (dh) = EVP_PKEY_get0_DH(_pkey); \ + if ((dh) == NULL) \ + ossl_raise(eDHError, "failed to get DH from EVP_PKEY"); \ } while (0) /* diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c index bf92e1ceac6412..cb38786b560c0a 100644 --- a/ext/openssl/ossl_pkey_dsa.c +++ b/ext/openssl/ossl_pkey_dsa.c @@ -21,6 +21,8 @@ EVP_PKEY *_pkey; \ GetPKeyDSA((obj), _pkey); \ (dsa) = EVP_PKEY_get0_DSA(_pkey); \ + if ((dsa) == NULL) \ + ossl_raise(eDSAError, "failed to get DSA from EVP_PKEY"); \ } while (0) static inline int diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c index e3553c44188012..8c97297a56193e 100644 --- a/ext/openssl/ossl_pkey_ec.c +++ b/ext/openssl/ossl_pkey_ec.c @@ -22,6 +22,8 @@ static const rb_data_type_t ossl_ec_point_type; EVP_PKEY *_pkey; \ GetPKeyEC(obj, _pkey); \ (key) = EVP_PKEY_get0_EC_KEY(_pkey); \ + if ((key) == NULL) \ + ossl_raise(eECError, "failed to get EC_KEY from EVP_PKEY"); \ } while (0) #define GetECGroup(obj, group) do { \ diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c index 4f7862023a61c7..b2983d3b53cfc2 100644 --- a/ext/openssl/ossl_pkey_rsa.c +++ b/ext/openssl/ossl_pkey_rsa.c @@ -21,6 +21,8 @@ EVP_PKEY *_pkey; \ GetPKeyRSA((obj), _pkey); \ (rsa) = EVP_PKEY_get0_RSA(_pkey); \ + if ((rsa) == NULL) \ + ossl_raise(eRSAError, "failed to get RSA from EVP_PKEY"); \ } while (0) static inline int From ecf5aa18cab6b7f770acea25bee4f93dc6e41e07 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Mon, 27 Oct 2025 15:16:20 +0900 Subject: [PATCH 12/12] [ruby/openssl] Sync History.md --- ext/openssl/History.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ext/openssl/History.md b/ext/openssl/History.md index ecc53fad3beb7c..32a2c0b2fb6ea7 100644 --- a/ext/openssl/History.md +++ b/ext/openssl/History.md @@ -1,3 +1,9 @@ +Version 3.3.2 +============= + +Merged changes in 3.1.3 and 3.2.3. + + Version 3.3.1 ============= @@ -80,6 +86,12 @@ And various non-user-visible changes and bug fixes. Please see the commit history for more details. +Version 3.2.3 +============= + +Merged changes in 3.1.3. + + Version 3.2.2 ============= @@ -132,6 +144,16 @@ Notable changes [[GitHub #141]](https://github.com/ruby/openssl/pull/141) +Version 3.1.3 +============= + +Bug fixes +--------- + +* Fix missing NULL check for `EVP_PKEY_get0()` functions with OpenSSL 3.x. + [[GitHub #957]](https://github.com/ruby/openssl/pull/957) + + Version 3.1.2 =============