Disabled JRuby for now, needs to be made 1.1 compliant

master
Arjen Poutsma 16 years ago
parent 1b26e8f9c6
commit 3b6f092219
  1. 9
      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) { public static Object createJRubyObject(String scriptSource, Class[] interfaces, ClassLoader classLoader) {
Ruby ruby = initializeRuntime(); Ruby ruby = initializeRuntime();
Node scriptRootNode = null;
/* TODO: make this JRuby 1.1 compliant
Node scriptRootNode = (oldParseMethod != null ? Node scriptRootNode = (oldParseMethod != null ?
(Node) ReflectionUtils.invokeMethod(oldParseMethod, ruby, new Object[] {scriptSource, "", null}) : (Node) ReflectionUtils.invokeMethod(oldParseMethod, ruby, new Object[] {scriptSource, "", null}) :
ruby.parse(scriptSource, "", null, 0)); ruby.parse(scriptSource, "", null, 0));
*/
IRubyObject rubyObject = null;
/** TODO: make this JRuby 1.1 compliant
IRubyObject rubyObject = ruby.eval(scriptRootNode); IRubyObject rubyObject = ruby.eval(scriptRootNode);
*/
if (rubyObject instanceof RubyNil) { if (rubyObject instanceof RubyNil) {
String className = findClassName(scriptRootNode); String className = findClassName(scriptRootNode);
/** TODO: make this JRuby 1.1 compliant
rubyObject = ruby.evalScript("\n" + className + ".new"); rubyObject = ruby.evalScript("\n" + className + ".new");
*/
} }
// still null? // still null?
if (rubyObject instanceof RubyNil) { if (rubyObject instanceof RubyNil) {

Loading…
Cancel
Save