From 71d03e1003e999e77097c2aa085dd1b2004e00b1 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 6 May 2024 12:26:13 -0500 Subject: [PATCH 1/2] Update maven plugins to latest Older JRuby in older plugins has trouble on Apple M1. --- .mvn/extensions.xml | 6 +++--- Mavenfile | 6 +++--- pom.xml | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index a02a5a52..86abdc76 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -1,13 +1,13 @@ - org.torquebox.mojo + org.jruby.maven mavengem-wagon - 1.0.3 + 2.0.2 io.takari.polyglot polyglot-ruby - 0.4.8 + 0.7.0 diff --git a/Mavenfile b/Mavenfile index aefaf026..25e36a7b 100644 --- a/Mavenfile +++ b/Mavenfile @@ -107,15 +107,15 @@ supported_bc_versions = %w{ 1.60 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 } default_bc_version = File.read File.expand_path('lib/jopenssl/version.rb', File.dirname(__FILE__)) default_bc_version = default_bc_version[/BOUNCY_CASTLE_VERSION\s?=\s?'(.*?)'/, 1] -properties( 'jruby.plugins.version' => '2.0.1', # 2.0.1 +properties( 'jruby.plugins.version' => '3.0.2', 'jruby.switches' => '-W0', # https://github.com/torquebox/jruby-maven-plugins/issues/94 'bc.versions' => default_bc_version, 'invoker.test' => '${bc.versions}', # allow to skip all tests with -Dmaven.test.skip 'invoker.skip' => '${maven.test.skip}', 'runit.dir' => 'src/test/ruby/**/test_*.rb', - 'mavengem.wagon.version' => '1.0.3', # for jruby plugin - 'mavengem-wagon.version' => '1.0.3', # for polyglot-ruby + 'mavengem.wagon.version' => '2.0.2', # for jruby plugin + 'mavengem-wagon.version' => '2.0.2', # for polyglot-ruby # use this version of jruby for the jruby-maven-plugins 'jruby.versions' => MVN_JRUBY_VERSION, 'jruby.version' => MVN_JRUBY_VERSION, # dump pom.xml when running 'rmvn' diff --git a/pom.xml b/pom.xml index 6440e62d..c8bc2c78 100644 --- a/pom.xml +++ b/pom.xml @@ -63,12 +63,12 @@ DO NOT MODIFY - GENERATED CODE 1.78 ${maven.test.skip} ${bc.versions} - 2.0.1 + 3.0.2 -W0 9.2.19.0 9.2.19.0 - 1.0.3 - 1.0.3 + 2.0.2 + 2.0.2 pom.xml false src/test/ruby/**/test_*.rb @@ -122,12 +122,12 @@ DO NOT MODIFY - GENERATED CODE - org.torquebox.mojo + org.jruby.maven mavengem-wagon ${mavengem.wagon.version} - de.saumya.mojo + org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} @@ -181,7 +181,7 @@ DO NOT MODIFY - GENERATED CODE - de.saumya.mojo + org.jruby.maven gem-maven-plugin ${jruby.plugins.version} @@ -351,7 +351,7 @@ DO NOT MODIFY - GENERATED CODE - de.saumya.mojo + org.jruby.maven runit-maven-plugin ${jruby.plugins.version} From a011807d5630f871857de0f7de4b3699b99f82ec Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 6 May 2024 13:03:34 -0500 Subject: [PATCH 2/2] Convert IOException to Ruby exception correctly Many libraries depend on us raising the actual Errno exceptions for what comes out of Java as IOException. The utilities in JRuby exist to convert these IOException objects into the appropriate Errno exception by examining the exception type and message. This patch switches one key place for #242 to use this utility method. --- src/main/java/org/jruby/ext/openssl/SSLSocket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jruby/ext/openssl/SSLSocket.java b/src/main/java/org/jruby/ext/openssl/SSLSocket.java index 63bbc07b..f817d1a3 100644 --- a/src/main/java/org/jruby/ext/openssl/SSLSocket.java +++ b/src/main/java/org/jruby/ext/openssl/SSLSocket.java @@ -952,7 +952,7 @@ private IRubyObject syswriteImpl(final ThreadContext context, } catch (IOException ex) { debugStackTrace(runtime, "SSLSocket.syswriteImpl", ex); - throw Utils.newError(runtime, runtime.getIOError(), ex); + throw runtime.newIOErrorFromException(ex); } }