Skip to content

Commit

Permalink
Dont save/restore $! in the teardown method used by embedding API
Browse files Browse the repository at this point in the history
* This seems to be messing with the embedding API based testing
  wherein excluded failures are being reported (in Travis testing
  but reproducible locally as well).
  • Loading branch information
subbuss committed Feb 14, 2015
1 parent 1b5b3d7 commit 5f3ff7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/Ruby.java
Expand Up @@ -3228,7 +3228,7 @@ public void tearDown(boolean systemExit) {

while (!atExitBlocks.empty()) {
RubyProc proc = atExitBlocks.pop();
IRubyObject oldExc = context.runtime.getGlobalVariables().get("$!"); // Save $!
// IRubyObject oldExc = context.runtime.getGlobalVariables().get("$!"); // Save $!
try {
proc.call(getCurrentContext(), IRubyObject.NULL_ARRAY);
} catch (RaiseException rj) {
Expand All @@ -3244,7 +3244,7 @@ public void tearDown(boolean systemExit) {
}
}
// Reset $! now that rj has been handled
context.runtime.getGlobalVariables().set("$!", oldExc);
// context.runtime.getGlobalVariables().set("$!", oldExc);
}
}

Expand Down

0 comments on commit 5f3ff7c

Please sign in to comment.