diff --git a/core/src/main/java/org/jruby/RubyIO.java b/core/src/main/java/org/jruby/RubyIO.java index 115c2592799..144660fe82e 100644 --- a/core/src/main/java/org/jruby/RubyIO.java +++ b/core/src/main/java/org/jruby/RubyIO.java @@ -2619,9 +2619,9 @@ private IRubyObject ctl(ThreadContext context, IRubyObject cmd, IRubyObject arg) return runtime.newFixnum(close_on_exec_p(context).isTrue() ? FD_CLOEXEC : 0); } else if (realCmd == Fcntl.F_SETFL.intValue()) { if ((nArg & OpenFlags.O_NONBLOCK.intValue()) != 0) { - fptr.setBlocking(runtime, true); - } else { fptr.setBlocking(runtime, false); + } else { + fptr.setBlocking(runtime, true); } if ((nArg & OpenFlags.O_CLOEXEC.intValue()) != 0) {