Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/org/jruby/RubyDir.java
Original file line number Diff line number Diff line change
@@ -338,6 +338,8 @@ public static IRubyObject chdir(ThreadContext context, IRubyObject recv, IRubyOb
try {
result = block.yield(context, path);
} finally {
// basically check if the oldCWD still exists
getDir(runtime, oldCwd, true);
runtime.setCurrentDirectory(oldCwd);
}
} else {

0 comments on commit 2ecb4ed

Please sign in to comment.