Skip to content

Commit

Permalink
Revert "It appears getLexicalScopes can return null now."
Browse files Browse the repository at this point in the history
This reverts commit ca14416.
  • Loading branch information
headius committed Mar 11, 2015
1 parent ca14416 commit f116569
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions core/src/main/java/org/jruby/ir/persistence/IRWriter.java
Expand Up @@ -34,10 +34,8 @@ public static void persist(IRWriterEncoder file, IRScope script) throws IOExcept
private static void persistScopeInstructions(IRWriterEncoder file, IRScope parent) {
persistScopeInstrs(file, parent);

if (parent.getLexicalScopes() != null) {
for (IRScope scope: parent.getLexicalScopes()) {
persistScopeInstructions(file, scope);
}
for (IRScope scope: parent.getLexicalScopes()) {
persistScopeInstructions(file, scope);
}
}

Expand All @@ -62,10 +60,8 @@ private static void persistScopeInstrs(IRWriterEncoder file, IRScope scope) {
private static void persistScopeHeaders(IRWriterEncoder file, IRScope parent) {
persistScopeHeader(file, parent);

if (parent.getLexicalScopes() != null) {
for (IRScope scope : parent.getLexicalScopes()) {
persistScopeHeaders(file, scope);
}
for (IRScope scope: parent.getLexicalScopes()) {
persistScopeHeaders(file, scope);
}
}

Expand Down

0 comments on commit f116569

Please sign in to comment.