Update JRuby to 9.1.15.0
MODIFY
asciidoctorj-core/src/main/java/org/asciidoctor/internal/EnvironmentInjector.java
asciidoctorj-core/src/main/java/org/asciidoctor/internal/EnvironmentInjector.java
@@ -14,12 +14,12 @@ class EnvironmentInjector {
this.config = config;
}
- void inject(Map<String, Object> environmentVars) {
+ void inject(Map<String, String> environmentVars) {
if (!environmentVars.isEmpty()) {
- Map<String, Object> replacementEnv = new HashMap<String, Object>(System.getenv());
- for (Map.Entry<String, Object> envVar : environmentVars.entrySet()) {
+ Map<String, String> replacementEnv = new HashMap<String, String>(System.getenv());
+ for (Map.Entry<String, String> envVar : environmentVars.entrySet()) {
String key = envVar.getKey();
- Object val = envVar.getValue();
+ String val = envVar.getValue();
if (val == null || "".equals(val)) {
replacementEnv.remove(envVar.getKey());
if ("GEM_PATH".equals(key) && !environmentVars.containsKey("GEM_HOME")) {

MODIFY
asciidoctorj-core/src/main/java/org/asciidoctor/internal/JRubyAsciidoctor.java
asciidoctorj-core/src/main/java/org/asciidoctor/internal/JRubyAsciidoctor.java
package org.asciidoctor.internal;
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.logging.Logger;
+
import org.asciidoctor.Asciidoctor;
import org.asciidoctor.Attributes;
import org.asciidoctor.DirectoryWalker;
@@ -27,20 +41,6 @@ import org.jruby.embed.ScriptingContainer;
import org.jruby.exceptions.RaiseException;
import org.jruby.javasupport.JavaEmbedUtils;
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.logging.Logger;
-
public class JRubyAsciidoctor implements Asciidoctor {
private static final Logger logger = Logger.getLogger(JRubyAsciidoctor.class.getName());
@@ -65,7 +65,7 @@ public class JRubyAsciidoctor implements Asciidoctor {
}
public static Asciidoctor create(String gemPath) {
- Map<String, Object> env = new HashMap<String, Object>();
+ Map<String, String> env = new HashMap<String, String>();
// a null value will clear the GEM_PATH and GEM_HOME
env.put(GEM_PATH, gemPath);
@@ -121,7 +121,7 @@ public class JRubyAsciidoctor implements Asciidoctor {
return jRubyAsciidoctor;
}
- private static Asciidoctor createJRubyAsciidoctorInstance(Map<String, Object> environmentVars) {
+ private static Asciidoctor createJRubyAsciidoctorInstance(Map<String, String> environmentVars) {
RubyInstanceConfig config = createOptimizedConfiguration();
injectEnvironmentVariables(config, environmentVars);
@@ -140,7 +140,7 @@ public class JRubyAsciidoctor implements Asciidoctor {
private static Asciidoctor createJRubyAsciidoctorInstance(ClassLoader classloader, String gemPath) {
- Map<String, Object> env = new HashMap<String, Object>();
+ Map<String, String> env = new HashMap<String, String>();
env.put(GEM_PATH, gemPath);
ScriptingContainer container = new ScriptingContainer();
@@ -158,7 +158,7 @@ public class JRubyAsciidoctor implements Asciidoctor {
return jRubyAsciidoctor;
}
- private static void injectEnvironmentVariables(RubyInstanceConfig config, Map<String, Object> environmentVars) {
+ private static void injectEnvironmentVariables(RubyInstanceConfig config, Map<String, String> environmentVars) {
EnvironmentInjector environmentInjector = new EnvironmentInjector(config);
environmentInjector.inject(environmentVars);
}

MODIFY
build.gradle
build.gradle
@@ -38,7 +38,7 @@ ext {
guavaVersion = '18.0'
hamcrestVersion = '1.3'
jcommanderVersion = '1.35'
- jrubyVersion = '1.7.26'
+ jrubyVersion = '9.1.15.0'
jsoupVersion = '1.8.3'
junitVersion = '4.12'
saxonVersion = '9.5.1-6'

Update JRuby to 9.1.15.0