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

Commits on Apr 18, 2017

  1. Copy the full SHA
    f8263e6 View commit details
  2. Regressed test:tracing

    enebo committed Apr 18, 2017
    Copy the full SHA
    bb7d364 View commit details
Showing with 4 additions and 3 deletions.
  1. +3 −2 core/src/main/java/org/jruby/common/RubyWarnings.java
  2. +1 −1 core/src/main/java/org/jruby/ir/IRBuilder.java
5 changes: 3 additions & 2 deletions core/src/main/java/org/jruby/common/RubyWarnings.java
Original file line number Diff line number Diff line change
@@ -113,13 +113,14 @@ public void warn(ID id, String message) {

if (stack.length == 0) {
file = "(unknown)";
line = -1;
line = 0;
} else {
file = stack[0].getFileName();
line = stack[0].getLineNumber();
}

warn(id, file, line, message);
// 1 is subtracted here because getRubyStackTrace is 1-indexed.
warn(id, file, line - 1, message);
}

public void warnOnce(ID id, String message) {
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRBuilder.java
Original file line number Diff line number Diff line change
@@ -1043,7 +1043,7 @@ public Operand buildCall(Variable result, CallNode callNode) {
!scope.maybeUsingRefinements() &&
callNode.getIterNode() == null) {
StrNode keyNode = (StrNode) argsAry.get(0);
addInstr(ArrayDerefInstr.create(result, receiver, new FrozenString(keyNode.getValue(), keyNode.getCodeRange(), keyNode.getPosition().getFile(), keyNode.getLine())));
addInstr(ArrayDerefInstr.create(result, receiver, new FrozenString(keyNode.getValue(), keyNode.getCodeRange(), scope.getFileName(), keyNode.getLine())));
return result;
}