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: 957ff595524b
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 163b210fd217
Choose a head ref
  • 3 commits
  • 7 files changed
  • 2 contributors

Commits on Nov 29, 2017

  1. Copy the full SHA
    0e959fe View commit details

Commits on Dec 5, 2017

  1. Copy the full SHA
    31af5c7 View commit details
  2. Copy the full SHA
    163b210 View commit details
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyEnumerable.java
Original file line number Diff line number Diff line change
@@ -1177,7 +1177,7 @@ public static IRubyObject each_with_index(ThreadContext context, IRubyObject sel

@Deprecated @SuppressWarnings("deprecation")
public static IRubyObject each_with_index19(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) {
return each_with_index19(context, self, args, block);
return each_with_index(context, self, args, block);
}

@JRubyMethod(required = 1)
5 changes: 4 additions & 1 deletion core/src/main/java/org/jruby/ext/ffi/StructLayout.java
Original file line number Diff line number Diff line change
@@ -658,7 +658,10 @@ public boolean equals(Object obj) {

@Override
public int hashCode() {
return 53 * 5 + (int) (this.offset ^ (this.offset >>> 32)) ^ type.hashCode();
int result = super.hashCode();
result = 31 * result + type.hashCode();
result = 31 * result + offset;
return result;
}

/**
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ext/ripper/RipperLexer.java
Original file line number Diff line number Diff line change
@@ -2349,7 +2349,7 @@ public boolean tokenAddMBC(int first_byte, ByteList buffer) {
int length = precise_mbclen();

if (length <= 0) {
compile_error("invalid multibyte char (" + getEncoding().getName() + ")");
compile_error("invalid multibyte char (" + getEncoding() + ")");
return false;
}

Original file line number Diff line number Diff line change
@@ -188,6 +188,6 @@ public int determineRPC(int ipc) {
if (ipc <= rescueIPCs[i]) return rescueIPCs[i + 1];
}

throw new RuntimeException("BUG: no RPC found for " + getFileName() + ":" + getName() + ":" + ipc + getInstructions());
throw new RuntimeException("BUG: no RPC found for " + getFileName() + ":" + getName() + ":" + ipc);
}
}
5 changes: 4 additions & 1 deletion core/src/main/java/org/jruby/ir/operands/SymbolProc.java
Original file line number Diff line number Diff line change
@@ -34,7 +34,10 @@ public Object createCacheObject(ThreadContext context) {

@Override
public int hashCode() {
return 47 * 7 + (int) (this.name.hashCode() ^ (this.encoding.hashCode() >>> 32));
int result = super.hashCode();
result = 31 * result + name.hashCode();
result = 31 * result + encoding.hashCode();
return result;
}

@Override
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/Pack.java
Original file line number Diff line number Diff line change
@@ -1320,7 +1320,7 @@ else if (encode.hasRemaining()) {
}

long ul = 0;
long ulmask = (0xfe << 56) & 0xffffffff;
long ulmask = (0xfeL << 56) & 0xffffffff;
RubyBignum big128 = RubyBignum.newBignum(runtime, 128);
int pos = encode.position();

2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/io/ChannelStream.java
Original file line number Diff line number Diff line change
@@ -561,7 +561,7 @@ private final int copyBufferedBytes(ByteList dst, int len) {

dst.ensure(Math.min(len, bufferedInputBytesRemaining()));

if (hasUngotChars() && hasUngotChars()) {
if (hasUngotChars()) {
for(int i = 0; i < ungotChars.length(); i++){
byte ungotc = (byte) ungotChars.get(i);
++bytesCopied;