@@ -35,6 +35,7 @@ import org.knime.core.data.`def`.IntCell
3535import org .knime .ext .jruby .preferences .PreferenceConstants
3636import scala .collection .JavaConversions ._
3737import scala .util .matching .Regex
38+ import scala .collection .mutable .ArrayBuffer
3839
3940/**
4041 * This is the model implementation of RubyScript.
@@ -219,23 +220,24 @@ end
219220 ext.append(corePluginPath + fileSep + " lib" )
220221 ext.append(getJavaExtDirsExtensionPath)
221222
222- val classpath = coreClassPath.split(" ," ).view
223+ val classpath = ArrayBuffer [String ]()
224+ classpath ++= coreClassPath.split(" ," ).view
223225 .map(s => FileLocator .find(core, new Path (s), null )).filter(_ != null )
224226 .map(FileLocator .resolve(_).getFile)
225227
226- classpath.add( corePluginPath + fileSep + " bin" )
228+ classpath += corePluginPath + fileSep + " bin"
227229 baseClassPath.split(" ," ).view
228230 .map(s => FileLocator .find(base, new Path (s), null )).filter(_ != null )
229231 .foreach { u => classpath.add(FileLocator .resolve(u).getFile) }
230232
231- classpath.add( basePluginPath + fileSep + " bin" )
232- classpath.add( getJavaClasspathExtensionPath)
233+ classpath += basePluginPath + fileSep + " bin"
234+ classpath += getJavaClasspathExtensionPath
233235 if (RubyScriptNodePlugin .getDefault.getPreferenceStore.getBoolean(PreferenceConstants .JRUBY_USE_EXTERNAL_GEMS )) {
234236 val str = RubyScriptNodePlugin .getDefault.getPreferenceStore.getString(PreferenceConstants .JRUBY_PATH )
235237 System .setProperty(" jruby.home" , str)
236238 }
237239 var container = new ScriptingContainer (LocalContextScope .THREADSAFE )
238- container.setCompatVersion(CompatVersion .RUBY2_0 )
240+ // container.setCompatVersion(CompatVersion.RUBY2_0)
239241 container.setCompileMode(CompileMode .JIT )
240242 container.setLoadPaths(classpath)
241243 container.setOutput(new LoggerOutputStream (logger, NodeLogger .LEVEL .WARN ))
0 commit comments