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

Commits on Aug 7, 2017

  1. Copy the full SHA
    5a91288 View commit details
  2. Copy the full SHA
    5a541d7 View commit details
  3. Copy the full SHA
    8ab4df0 View commit details
  4. Copy the full SHA
    270c0f8 View commit details
5 changes: 5 additions & 0 deletions core/src/main/java/org/jruby/RubyBignum.java
Original file line number Diff line number Diff line change
@@ -1114,6 +1114,11 @@ protected boolean int_round_zero_p(ThreadContext context, int ndigits) {
return (-0.415241 * ndigits - 0.125 > bytes);
}

@Override
public boolean isImmediate() {
return true;
}

@Deprecated
public final IRubyObject op_pow(final ThreadContext context, final long other) {
if (other >= 0) {
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/RubyFileStat.java
Original file line number Diff line number Diff line change
@@ -344,6 +344,9 @@ public IRubyObject inspect() {
buf.append("atime=").append(atime()).append(", ");
buf.append("mtime=").append(mtime()).append(", ");
buf.append("ctime=").append(ctime());
if (Platform.IS_BSD || Platform.IS_MAC) {
buf.append(", ").append("birthtime=").append(birthtime());
}
}
buf.append('>');

9 changes: 7 additions & 2 deletions core/src/main/java/org/jruby/RubyThread.java
Original file line number Diff line number Diff line change
@@ -917,7 +917,7 @@ public final Map<Object, IRubyObject> getContextVariables() {
}

public boolean isAlive(){
return threadImpl.isAlive() && status.get() != Status.ABORTING;
return threadImpl.isAlive() && status.get() != Status.DEAD;
}

@JRubyMethod(name = "[]", required = 1)
@@ -1156,15 +1156,17 @@ public static IRubyObject stop(ThreadContext context, IRubyObject receiver) {

synchronized (rubyThread) {
rubyThread.pollThreadEvents(context);
Status oldStatus = rubyThread.status.get();
try {
// attempt to decriticalize all if we're the critical thread
receiver.getRuntime().getThreadService().setCritical(false);

rubyThread.status.set(Status.SLEEP);
rubyThread.wait();
} catch (InterruptedException ie) {
} finally {
rubyThread.pollThreadEvents(context);
rubyThread.status.set(Status.RUN);
rubyThread.status.set(oldStatus);
}
}

@@ -1521,6 +1523,9 @@ public IRubyObject kill() {
if (currentThread == runtime.getThreadService().getMainThread()) {
// rb_exit to hard exit process...not quite right for us
}

status.set(Status.ABORTING);

return genericKill(runtime, currentThread);
}

2 changes: 2 additions & 0 deletions core/src/main/java/org/jruby/ext/stringio/StringIO.java
Original file line number Diff line number Diff line change
@@ -1065,6 +1065,8 @@ public IRubyObject ungetc(ThreadContext context, IRubyObject arg) {
Encoding enc, enc2;

checkModifiable();
checkReadable();

if (arg.isNil()) return arg;
if (arg instanceof RubyInteger) {
int len, cc = ((RubyInteger) arg).getIntValue();