Skip to content

Commit

Permalink
Require JRuby 1.6+ (avoiding the use of deprecated API)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Mar 19, 2013
1 parent 7ef5c5c commit 90f79f3
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,8 +80,7 @@ public static Object createJRubyObject(String scriptSource, Class[] interfaces,
Ruby ruby = initializeRuntime();

Node scriptRootNode = ruby.parseEval(scriptSource, "", null, 0);
// keep using the deprecated runNormally variant for JRuby 1.1/1.2 compatibility...
IRubyObject rubyObject = ruby.runNormally(scriptRootNode, false);
IRubyObject rubyObject = ruby.runNormally(scriptRootNode);

if (rubyObject instanceof RubyNil) {
String className = findClassName(scriptRootNode);
Expand Down

0 comments on commit 90f79f3

Please sign in to comment.