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

Commits on Dec 28, 2015

  1. Copy the full SHA
    813f664 View commit details
  2. Copy the full SHA
    3e2ad72 View commit details
Showing with 4 additions and 3 deletions.
  1. +3 −2 core/src/main/java/org/jruby/ext/io/wait/IOWaitLibrary.java
  2. +1 −1 core/src/main/java/org/jruby/ext/stringio/StringIO.java
5 changes: 3 additions & 2 deletions core/src/main/java/org/jruby/ext/io/wait/IOWaitLibrary.java
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
import org.jruby.RubyClass;
import org.jruby.RubyIO;
import org.jruby.RubyNumeric;
import org.jruby.RubyTime;
import org.jruby.anno.JRubyMethod;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;
@@ -114,7 +115,7 @@ public static IRubyObject wait_readable(ThreadContext context, IRubyObject _io,
tv = -1;
}
else {
tv = timeout.convertToInteger().getLongValue() * 1000;
tv = (long)(RubyTime.convertTimeInterval(context, timeout) * 1000);
if (tv < 0) throw runtime.newArgumentError("time interval must be positive");
}

@@ -154,7 +155,7 @@ public static IRubyObject wait_writable(ThreadContext context, IRubyObject _io,
tv = -1;
}
else {
tv = timeout.convertToInteger().getLongValue() * 1000;
tv = (long)(RubyTime.convertTimeInterval(context, timeout) * 1000);
if (tv < 0) throw runtime.newArgumentError("time interval must be positive");
}

2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ext/stringio/StringIO.java
Original file line number Diff line number Diff line change
@@ -874,7 +874,7 @@ public IRubyObject read_nonblock(ThreadContext context, IRubyObject[] args) {

IRubyObject val = read(context, args);
if (val.isNil()) {
if (!exception) return runtime.newSymbol("wait_readable");
if (!exception) return context.nil;
throw context.runtime.newEOFError();
}