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: 7e8135ca1fbf
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 09fe6c246011
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Mar 16, 2015

  1. Copy the full SHA
    df844a9 View commit details
  2. Copy the full SHA
    09fe6c2 View commit details
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -27,8 +27,6 @@ matrix:
# these profile do no need to run for all JDKs
- env: PHASE='-Pjruby-jars,test -Dinvoker.test=extended'
jdk: oraclejdk7
- env: PHASE='-Pmain,test -Dinvoker.test=extended'
jdk: openjdk7
fast_finish: true


9 changes: 2 additions & 7 deletions core/src/main/java/org/jruby/RubyIO.java
Original file line number Diff line number Diff line change
@@ -39,7 +39,6 @@
import jnr.constants.platform.OpenFlags;
import jnr.enxio.channels.NativeDeviceChannel;
import jnr.enxio.channels.NativeSelectableChannel;
import jnr.posix.POSIX;
import org.jcodings.transcode.EConvFlags;
import org.jruby.runtime.Helpers;
import org.jruby.util.StringSupport;
@@ -1829,19 +1828,15 @@ public RubyBoolean eof_p(ThreadContext context) {
@JRubyMethod(name = {"tty?", "isatty"})
public RubyBoolean tty_p(ThreadContext context) {
Ruby runtime = context.runtime;
POSIX posix = runtime.getPosix();
OpenFile fptr;

fptr = getOpenFileChecked();

fptr.lock();
try {
if (posix.isNative() && fptr.fd().realFileno != -1) {
return posix.libc().isatty(fptr.getFileno()) == 0 ? runtime.getFalse() : runtime.getTrue();
} else if (fptr.isStdio()) {
// This is a bit of a hack for platforms where we can't do native stdio
if (fptr.isStdio()) return runtime.getTrue();
if (runtime.getPosix().isNative() && runtime.getPosix().libc().isatty(fptr.getFileno()) != 0)
return runtime.getTrue();
}
} finally {
fptr.unlock();
}
Original file line number Diff line number Diff line change
@@ -92,15 +92,15 @@ private void runIt(String index, String script) throws Exception {
// runIt("objectspace");
// }

@Test
public void testMRI() throws Exception {
runIt("mri", "ENV['EXCLUDE_DIR']='test/mri/excludes';");
}

@Test
public void testSlow() throws Exception {
runIt("slow");
}
// @Test
// public void testMRI() throws Exception {
// runIt("mri", "ENV['EXCLUDE_DIR']='test/mri/excludes';");
// }
//
// @Test
// public void testSlow() throws Exception {
// runIt("slow");
// }

@Test
public void testJRuby() throws Exception {
6 changes: 0 additions & 6 deletions spec/regression/GH-2627_stdio_should_reflect_pipe_tty_spec.rb

This file was deleted.