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

Commits on Apr 24, 2018

  1. Copy the full SHA
    13e2499 View commit details
  2. Copy the full SHA
    5441086 View commit details
  3. Copy the full SHA
    5d89f52 View commit details
  4. Copy the full SHA
    2d7dd82 View commit details
  5. Copy the full SHA
    bf86e73 View commit details
  6. Copy the full SHA
    b0f614c View commit details
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -725,7 +725,7 @@ private RootNode addGetsLoop(RootNode oldRoot, boolean printing, boolean process
BlockNode whileBody = new BlockNode(pos);
newBody.add(new WhileNode(pos, new VCallNode(pos, "gets"), whileBody));

if (processLineEndings) whileBody.add(new CallNode(pos, dollarUnderscore, "chop!", null, null));
if (processLineEndings) whileBody.add(new CallNode(pos, dollarUnderscore, "chomp!", null, null));
if (split) whileBody.add(new GlobalAsgnNode(pos, "$F", new CallNode(pos, dollarUnderscore, "split", null, null)));

if (oldRoot.getBodyNode() instanceof BlockNode) { // common case n stmts
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
@@ -1141,9 +1141,9 @@ private IRubyObject op_equalCommon(ThreadContext context, IRubyObject other) {
return sites(context).equals.call(context, this, other, this).isTrue() ? runtime.getTrue() : runtime.getFalse();
}

@JRubyMethod(name = "-@") // -'foo' returns frozen string
@JRubyMethod(name = "-@") // -'foo' returns deduplicated (interned) string
public final IRubyObject minus_at(ThreadContext context) {
return isFrozen() ? this : context.runtime.freezeAndDedupString(this);
return context.runtime.freezeAndDedupString(this);
}

@JRubyMethod(name = "+@") // +'foo' returns modifiable string
6 changes: 4 additions & 2 deletions core/src/main/java/org/jruby/RubySymbol.java
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@
import org.jruby.runtime.CallSite;
import org.jruby.runtime.ClassIndex;
import org.jruby.runtime.ContextAwareBlockBody;
import org.jruby.runtime.Helpers;
import org.jruby.runtime.MethodIndex;
import org.jruby.runtime.ObjectAllocator;
import org.jruby.runtime.Signature;
@@ -105,10 +106,11 @@ private RubySymbol(Ruby runtime, String internedSymbol, ByteList symbolBytes) {
this.symbolBytes = symbolBytes;
this.id = runtime.allocSymbolId();

long k0 = Helpers.hashStart(runtime, id);
long hash = runtime.isSiphashEnabled() ? SipHashInline.hash24(
symbolHashSeedK0, 0, symbolBytes.getUnsafeBytes(),
k0, 0, symbolBytes.getUnsafeBytes(),
symbolBytes.getBegin(), symbolBytes.getRealSize()) :
PerlHash.hash(symbolHashSeedK0, symbolBytes.getUnsafeBytes(),
PerlHash.hash(k0, symbolBytes.getUnsafeBytes(),
symbolBytes.getBegin(), symbolBytes.getRealSize());
this.hashCode = (int) hash;
setFrozen(true);
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/Sprintf.java
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ public class Sprintf {
private static final String ERR_MALFORMED_DOT_NUM = "malformed format string - %.[0-9]";
private static final String ERR_MALFORMED_STAR_NUM = "malformed format string - %*[0-9]";
private static final String ERR_ILLEGAL_FORMAT_CHAR = "illegal format character - %";
private static final String ERR_INCOMPLETE_FORMAT_SPEC = "incomplete format specifier; use %%%% (double %%) instead";
private static final String ERR_INCOMPLETE_FORMAT_SPEC = "incomplete format specifier; use %% (double %) instead";
private static final String ERR_MALFORMED_NAME = "malformed name - unmatched parenthesis";

private static final ThreadLocal<Map<Locale, NumberFormat>> LOCALE_NUMBER_FORMATS = new ThreadLocal<Map<Locale, NumberFormat>>();
2 changes: 2 additions & 0 deletions test/mri/excludes/TestRequire.rb
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@
exclude :test_loading_fifo_threading_success, "we do not use IO to read files and so will not show as stopped while loading"
exclude :test_race_exception, "needs investigation"
exclude :test_require_changed_home, "needs investigation"
exclude :test_require_insecure_path, "JRuby does not have null-terminated strings nor tainting"
exclude :test_require_insecure_path_shift_jis, "JRuby does not have null-terminated strings nor tainting"
exclude :test_require_nonascii, "needs investigation"
exclude :test_require_nonascii_path_shift_jis, "needs investigation"
exclude :test_require_path_home_1, "needs investigation"
1 change: 1 addition & 0 deletions test/mri/excludes/TestRubyOptions.rb
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
exclude :test_dump_yydebug_with_rflag, "MRI-specific format"
exclude :test_encoding, "needs investigation"
exclude :test_eval, "needs investigation"
exclude :test_flag_in_shebang, "unreliable with our bash script"
exclude :test_frozen_string_literal_debug, "needs investigation #4303"
exclude :test_indentation_check, "needs investigation"
exclude :test_invalid_option, "needs investigation"