Skip to content

Commit

Permalink
Ensure CFG is built at the end of IRScope.initScope()
Browse files Browse the repository at this point in the history
* Unbreaks failing MRI tests that I broke in fa44bc1
  • Loading branch information
subbuss committed Oct 23, 2014
1 parent e54dc35 commit a33c383
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/java/org/jruby/ir/IRScope.java
Expand Up @@ -606,6 +606,12 @@ protected void initScope(boolean jitMode) {
// commandline (so as to honor the commandline request).
optimizeSimpleScopes();
}

// If at the end, the cfg is still not build, build it.
// (ex: unsafe scopes for which passes don't run).
if (getCFG() == null) {
buildCFG();
}
}

/** Make version specific to scope which needs it (e.g. Closure vs non-closure). */
Expand Down

0 comments on commit a33c383

Please sign in to comment.