Disabled JRuby for now, needs to be made 1.1 compliant

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@120 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Arjen Poutsma 2008-10-23 13:48:19 +00:00
parent 98a4ba4b73
commit e39d83d2b2
1 changed files with 9 additions and 0 deletions

View File

@ -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) {