From 3b6f092219a8f4edab37b02ed695331b12b918be Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Thu, 23 Oct 2008 13:48:19 +0000 Subject: [PATCH] Disabled JRuby for now, needs to be made 1.1 compliant --- .../scripting/jruby/JRubyScriptUtils.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/org.springframework.context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java b/org.springframework.context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java index 1cce091a74..228cc99fec 100644 --- a/org.springframework.context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java +++ b/org.springframework.context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java @@ -85,14 +85,23 @@ public abstract class JRubyScriptUtils { public static Object createJRubyObject(String scriptSource, Class[] interfaces, ClassLoader classLoader) { Ruby ruby = initializeRuntime(); + Node scriptRootNode = null; + /* TODO: make this JRuby 1.1 compliant + Node scriptRootNode = (oldParseMethod != null ? (Node) ReflectionUtils.invokeMethod(oldParseMethod, ruby, new Object[] {scriptSource, "", null}) : ruby.parse(scriptSource, "", null, 0)); + */ + IRubyObject rubyObject = null; + /** TODO: make this JRuby 1.1 compliant IRubyObject rubyObject = ruby.eval(scriptRootNode); + */ if (rubyObject instanceof RubyNil) { String className = findClassName(scriptRootNode); + /** TODO: make this JRuby 1.1 compliant rubyObject = ruby.evalScript("\n" + className + ".new"); + */ } // still null? if (rubyObject instanceof RubyNil) {