Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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>");
String scriptUTF8 = "puts \"Árbol de demostración\"" ;
ruby.executeScript(scriptUTF8, "<script>");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment