Skip to content

Commit 2ecb4ed

Browse files
committed
revert part of ef39dd5
1 parent 51aea61 commit 2ecb4ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/java/org/jruby/RubyDir.java

+2
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ public static IRubyObject chdir(ThreadContext context, IRubyObject recv, IRubyOb
338338
try {
339339
result = block.yield(context, path);
340340
} finally {
341+
// basically check if the oldCWD still exists
342+
getDir(runtime, oldCwd, true);
341343
runtime.setCurrentDirectory(oldCwd);
342344
}
343345
} else {

0 commit comments

Comments
 (0)