Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JRuby evalScript does not accept non-ascii characters. Is this the way it should be?
package ruby.experiments;
import java.util.ArrayList;
import org.jruby.Ruby;
import org.jruby.javasupport.JavaEmbedUtils;
public class EvalScriptlet {
public static void main(String[] args) {
Ruby ruby = JavaEmbedUtils.initialize(new ArrayList<String>());
String script = "puts 'Hello World'";
ruby.executeScript(script, "<script>");
ruby.evalScriptlet(script);
String scriptUTF8 = "puts \"Árbol de demostración\"" ;
ruby.executeScript(scriptUTF8, "<script>");
ruby.evalScriptlet(scriptUTF8);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.