Use JRuby equivalent of RubyVM.compile.
RubyVM is specific to CRuby and not supported on JRuby. This is the equivalent operation.
This commit is contained in:
parent
58bb7f0ca1
commit
f9f02e8216
@ -205,7 +205,12 @@ class RubyLex
|
||||
|
||||
begin # check if parser error are available
|
||||
verbose, $VERBOSE = $VERBOSE, nil
|
||||
RubyVM::InstructionSequence.compile(code)
|
||||
case RUBY_ENGINE
|
||||
when 'jruby'
|
||||
JRuby.compile_ir(code)
|
||||
else
|
||||
RubyVM::InstructionSequence.compile(code)
|
||||
end
|
||||
rescue SyntaxError => e
|
||||
case e.message
|
||||
when /unterminated (?:string|regexp) meets end of file/
|
||||
|
Loading…
x
Reference in New Issue
Block a user