From 863c8656f10021c02cdba429b3a6d1cc67a53530 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Thu, 21 May 2026 20:19:45 +0900 Subject: [PATCH 1/2] [ruby/openssl] Document syswrite_nonblock opts and symbol return value https://github.com/ruby/openssl/commit/6339db4386 --- ext/openssl/ossl_ssl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 9c0b68957947d0..3d913a396844cf 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -2196,9 +2196,12 @@ ossl_ssl_write(VALUE self, VALUE str) /* * call-seq: * ssl.syswrite_nonblock(string) => Integer + * ssl.syswrite_nonblock(string, opts) => Integer * * Writes _string_ to the SSL connection in a non-blocking manner. Raises an - * SSLError if writing would block. + * SSLError if writing would block. If "exception: false" is passed, this + * method returns a symbol of :wait_readable or :wait_writable, rather than + * raising an exception. */ static VALUE ossl_ssl_write_nonblock(int argc, VALUE *argv, VALUE self) From 0a7564be12ab36791d06c91fd88a1d4375e0fb6b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 22 May 2026 19:30:49 +0900 Subject: [PATCH 2/2] Add a custom gemspec loader to suppress external commands Do not execute `git` command which won't work when building from a tarball, to avoid the error message "fatal: not a git repository". The default gemspecs do not need these file lists anyway. --- tool/lib/bundled_gem.rb | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/tool/lib/bundled_gem.rb b/tool/lib/bundled_gem.rb index ca9b40875c2fa5..ad103825bc985e 100644 --- a/tool/lib/bundled_gem.rb +++ b/tool/lib/bundled_gem.rb @@ -131,10 +131,26 @@ def checkout(gemdir, repo, rev, git: $git) system(command, chdir: gemdir) or raise "failed: #{command}" end + class GemspecLoader + module NoPipe + refine IO.singleton_class do + def popen(...) ""; end + end + end + using NoPipe + + def `(command) ""; end + + def load_gemspec(file) + code = File.read(file, encoding: "utf-8:-") + eval(code, binding, file) + rescue + nil + end + end + def load_gemspec(g) - dir, base = File.split(g) - spec = Dir.chdir(dir) {Gem::Specification.load(base)} || Gem::Specification.load(g) or - return false + spec = GemspecLoader.new.load_gemspec(g) spec.files.clear spec.extensions.clear src = spec.to_ruby