Skip to content

Commit

Permalink
Use fd stat if possible to get mtime. Fixes #5073.
Browse files Browse the repository at this point in the history
headius committed Mar 19, 2018

Verified

This commit was signed with the committer’s verified signature.
headius Charles Oliver Nutter
1 parent 9ad761f commit e2f9386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyFile.java
Original file line number Diff line number Diff line change
@@ -438,7 +438,7 @@ public IRubyObject lstat(ThreadContext context) {
@JRubyMethod
public IRubyObject mtime(ThreadContext context) {
checkClosed(context);
return context.runtime.newFileStat(getPath(), false).mtime();
return ((RubyFileStat) stat(context)).mtime();
}

@JRubyMethod(meta = true)

0 comments on commit e2f9386

Please sign in to comment.