Skip to content

Commit e2f9386

Browse files
committedMar 19, 2018
Use fd stat if possible to get mtime. Fixes #5073.
1 parent 9ad761f commit e2f9386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎core/src/main/java/org/jruby/RubyFile.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ public IRubyObject lstat(ThreadContext context) {
438438
@JRubyMethod
439439
public IRubyObject mtime(ThreadContext context) {
440440
checkClosed(context);
441-
return context.runtime.newFileStat(getPath(), false).mtime();
441+
return ((RubyFileStat) stat(context)).mtime();
442442
}
443443

444444
@JRubyMethod(meta = true)

0 commit comments

Comments
 (0)
Please sign in to comment.