diff graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/JRubyParser.java @ 13645:497fada09efb

Ruby: remove versioning.
author Chris Seaton <chris.seaton@oracle.com>
date Wed, 15 Jan 2014 19:27:27 +0000
parents 0fbee3eb71f0
children 232eb6708943 fbf448929260
line wrap: on
line diff
--- a/graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/JRubyParser.java	Wed Jan 15 15:11:47 2014 +0100
+++ b/graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/JRubyParser.java	Wed Jan 15 19:27:27 2014 +0000
@@ -34,23 +34,6 @@
 
         final org.jrubyparser.Parser parser = new org.jrubyparser.Parser();
 
-        org.jrubyparser.CompatVersion parserVersion = null;
-
-        switch (context.getConfiguration().getRubyVersion()) {
-            case RUBY_18:
-                parserVersion = org.jrubyparser.CompatVersion.RUBY1_8;
-                break;
-            case RUBY_19:
-                parserVersion = org.jrubyparser.CompatVersion.RUBY1_9;
-                break;
-            case RUBY_20:
-                parserVersion = org.jrubyparser.CompatVersion.RUBY2_0;
-                break;
-            case RUBY_21:
-                parserVersion = org.jrubyparser.CompatVersion.RUBY2_0;
-                break;
-        }
-
         // TODO(cs) should this get a new unique method identifier or not?
         final TranslatorEnvironment environment = new TranslatorEnvironment(context, environmentForFrame(context, parentFrame), this, allocateReturnID(), true, true, new UniqueMethodIdentifier());
 
@@ -83,7 +66,7 @@
             }
         }
 
-        final org.jrubyparser.parser.ParserConfiguration parserConfiguration = new org.jrubyparser.parser.ParserConfiguration(0, parserVersion, staticScope);
+        final org.jrubyparser.parser.ParserConfiguration parserConfiguration = new org.jrubyparser.parser.ParserConfiguration(0, org.jrubyparser.CompatVersion.RUBY2_0, staticScope);
 
         // Parse to the JRuby AST