Permalink
Browse files

Fix change to ParserConfiguration

  • Loading branch information...
1 parent 06e4c04 commit cc0dc7f567e8f19903b5c8c55cb62363d9e4ffe7 @enebo enebo committed Jan 4, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 bench/BenchParser.java
View
@@ -4,6 +4,7 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import org.jruby.Ruby;
import org.jruby.RubyInstanceConfig;
import org.jruby.common.NullWarnings;
@@ -22,8 +23,9 @@ public static void main(String[] args) {
System.out.println("Parsing " + args[0] + " " + iterations + " times");
DefaultRubyParser parser = new DefaultRubyParser();
parser.setWarnings(new NullWarnings(null));
+ Ruby runtime = Ruby.getGlobalRuntime();
RubyInstanceConfig rconfig = new RubyInstanceConfig();
- ParserConfiguration config = new ParserConfiguration(rconfig.getKCode(), 0, false, false, true, rconfig);
+ ParserConfiguration config = new ParserConfiguration(runtime, 0, false, false, true, rconfig);
for (int x = 0; x < parsers.length; x++) {
System.out.println("Benching parse with " + (parsers[x] == 0 ? "InputStream" : "ByteArray") + "LexerSource");

0 comments on commit cc0dc7f

Please sign in to comment.