From 2c3723df843e66422a84c2442fe96f2e6a805ec0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 16 Mar 2026 09:11:28 +0900 Subject: [PATCH 1/2] [ruby/zlib] Drop older rubies than 2.7 This library already uses designated initializers, that is a C99 feature. C99 has been adopted since ruby 2.7. https://github.com/ruby/zlib/commit/cfa8fb2db4 --- ext/zlib/zlib.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zlib/zlib.gemspec b/ext/zlib/zlib.gemspec index 345dc5f22575e1..ba7114476f2d9e 100644 --- a/ext/zlib/zlib.gemspec +++ b/ext/zlib/zlib.gemspec @@ -27,5 +27,5 @@ Gem::Specification.new do |spec| spec.executables = [] spec.require_paths = ["lib"] spec.extensions = "ext/zlib/extconf.rb" - spec.required_ruby_version = ">= 2.5.0" + spec.required_ruby_version = ">= 2.7.0" end From c976dffd147d9f8871cd122dd8e35561d2b9422d Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 5 Jun 2026 09:36:06 +0900 Subject: [PATCH 2/2] IO::Buffer.map is not shareable across processes on OpenBSD Restore the OpenBSD exclusion dropped when the windows guard was replaced with a fork guard in the spec sync. OpenBSD has fork but MAP_SHARED writes are not reflected through read(2). https://rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20260604T223004Z.fail.html.gz Co-Authored-By: Claude Opus 4.8 (1M context) --- spec/ruby/core/io/buffer/map_spec.rb | 46 +++++++++++++++------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/spec/ruby/core/io/buffer/map_spec.rb b/spec/ruby/core/io/buffer/map_spec.rb index 4b28539ad82762..97764c2dd75429 100644 --- a/spec/ruby/core/io/buffer/map_spec.rb +++ b/spec/ruby/core/io/buffer/map_spec.rb @@ -73,30 +73,34 @@ def open_big_file_fixture @buffer.should.valid? end - guard -> { Process.respond_to?(:fork) } do - it "is shareable across processes" do - file_name = tmp("shared_buffer") - @file = File.open(file_name, "w+") - @file << "I'm private" - @file.rewind - @buffer = IO::Buffer.map(@file) - - IO.popen("-") do |child_pipe| - if child_pipe - # Synchronize on child's output. - child_pipe.readlines.first.chomp.should == @buffer.to_s - @buffer.get_string.should == "I'm shared!" - - @file.read.should == "I'm shared!" - else - @buffer.set_string("I'm shared!") - puts @buffer + # IO::Buffer.map seems not shareable across processes on OpenBSD. + # See https://rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20260129T163005Z.fail.html.gz + platform_is_not :openbsd do + guard -> { Process.respond_to?(:fork) } do + it "is shareable across processes" do + file_name = tmp("shared_buffer") + @file = File.open(file_name, "w+") + @file << "I'm private" + @file.rewind + @buffer = IO::Buffer.map(@file) + + IO.popen("-") do |child_pipe| + if child_pipe + # Synchronize on child's output. + child_pipe.readlines.first.chomp.should == @buffer.to_s + @buffer.get_string.should == "I'm shared!" + + @file.read.should == "I'm shared!" + else + @buffer.set_string("I'm shared!") + puts @buffer + end + ensure + child_pipe&.close end ensure - child_pipe&.close + File.unlink(file_name) end - ensure - File.unlink(file_name) end end