Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 213d935e7143
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a2ef35fc2df9
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 14, 2015

  1. Copy the full SHA
    1217305 View commit details
  2. Copy the full SHA
    a2ef35f View commit details
Showing with 3 additions and 2 deletions.
  1. +2 −1 core/src/main/java/org/jruby/util/io/ModeFlags.java
  2. +1 −1 core/src/main/java/org/jruby/util/io/PosixShim.java
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/util/io/ModeFlags.java
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@
import jnr.constants.platform.OpenFlags;
import jnr.posix.POSIX;
import org.jruby.Ruby;
import org.jruby.platform.Platform;

import java.nio.channels.Channel;
import java.nio.channels.FileChannel;
@@ -168,7 +169,7 @@ public static int oflagsFrom(POSIX posix, Channel channel) {
int mode;

int fileno = FilenoUtil.filenoFrom(channel);
if (FilenoUtil.isFake(fileno) || !posix.isNative()) {
if (FilenoUtil.isFake(fileno) || !posix.isNative() || Platform.IS_WINDOWS) {
// channel doesn't have a real fileno; best we can do is go off the Java type
if (channel instanceof ReadableByteChannel) {
if (channel instanceof WritableByteChannel) {
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/io/PosixShim.java
Original file line number Diff line number Diff line change
@@ -252,7 +252,7 @@ public Channel[] pipe() {
Pipe pipe = Pipe.open();
Channel source = pipe.source(), sink = pipe.sink();

if (posix.isNative()) {
if (posix.isNative() && !Platform.IS_WINDOWS) {
// set cloexec if possible
int read = FilenoUtil.filenoFrom(source);
int write = FilenoUtil.filenoFrom(sink);