Skip to content

Commit

Permalink
Check openness even if we won't advise on this platform
Browse files Browse the repository at this point in the history
Minor MacOS spec cleanup.
  • Loading branch information
headius committed Mar 2, 2021
1 parent d66a2eb commit 9987e64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/main/java/org/jruby/RubyIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -3784,14 +3784,14 @@ public IRubyObject advise(ThreadContext context, IRubyObject[] argv) {

POSIX posix = runtime.getNativePosix();

if (!(posix instanceof Linux)) {
return context.nil;
}

RubyIO io = GetWriteIO();

fptr = io.getOpenFileChecked();

if (!(posix instanceof Linux)) {
return context.nil;
}

int fd = fptr.fd().realFileno;

if (fd == -1) {
Expand Down

0 comments on commit 9987e64

Please sign in to comment.