Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/main/java/org/jruby/ir/Compiler.java
Original file line number Diff line number Diff line change
@@ -47,6 +47,11 @@ protected ScriptAndCode execute(final Ruby runtime, final IRScriptBody scope, Cl
byte[] bytecode;
MethodHandle _compiledHandle;

if ((scope.getBeginBlocks() != null && scope.getBeginBlocks().size() > 0) ||
(scope.getEndBlocks() != null && scope.getBeginBlocks().size() > 0)) {
throw new NotCompilableException("target script has BEGIN or END");
}

try {
JVMVisitor visitor = new JVMVisitor();
JVMVisitorMethodContext context = new JVMVisitorMethodContext();

0 comments on commit a2cdff8

Please sign in to comment.