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

Commits on May 23, 2016

  1. Copy the full SHA
    5a08eda View commit details
  2. Copy the full SHA
    bf80f32 View commit details
  3. Copy the full SHA
    3a2d6f8 View commit details
Original file line number Diff line number Diff line change
@@ -217,6 +217,11 @@ public DynamicObject negativeLengthError(int length, Node currentNode) {
return indexError(String.format("negative length (%d)", length), currentNode);
}

@TruffleBoundary
public DynamicObject indexErrorInvalidIndex(Node currentNode) {
return indexError("invalid index", currentNode);
}

// LocalJumpError

@TruffleBoundary
Original file line number Diff line number Diff line change
@@ -180,8 +180,8 @@ public EachNode(RubyContext context, SourceSection sourceSection) {
public DynamicObject each(VirtualFrame frame, DynamicObject history, DynamicObject block) {
final ConsoleHolder consoleHolder = getContext().getConsoleHolder();

for (Iterator<History.Entry> i = consoleHolder.getHistory().iterator(); i.hasNext();) {
final DynamicObject line = createString(StringOperations.createRope(i.next().value().toString(), getDefaultInternalEncoding()));
for (final History.Entry e : consoleHolder.getHistory()) {
final DynamicObject line = createString(StringOperations.createRope(e.value().toString(), getDefaultInternalEncoding()));

yield(frame, block, taintNode.executeTaint(line));
}
@@ -214,7 +214,7 @@ public Object getIndex(int index) {

return taintNode.executeTaint(ret);
} catch (IndexOutOfBoundsException e) {
throw new RaiseException(coreExceptions().indexError("invalid index", this));
throw new RaiseException(coreExceptions().indexErrorInvalidIndex(this));
}
}

@@ -242,7 +242,7 @@ public Object setIndex(VirtualFrame frame, int index, Object line) {

return nil();
} catch (IndexOutOfBoundsException e) {
throw new RaiseException(coreExceptions().indexError("invalid index", this));
throw new RaiseException(coreExceptions().indexErrorInvalidIndex(this));
}
}

@@ -270,7 +270,7 @@ public Object deleteAt(int index) {

return taintNode.executeTaint(ret);
} catch (IndexOutOfBoundsException e) {
throw new RaiseException(coreExceptions().indexError("invalid index", this));
throw new RaiseException(coreExceptions().indexErrorInvalidIndex(this));
}
}

Original file line number Diff line number Diff line change
@@ -262,7 +262,8 @@ public DynamicObject refreshLine() {
// Complete using a Proc object
public static class ProcCompleter implements Completer {

DynamicObject procCompleter;
private final DynamicObject procCompleter;

//\t\n\"\\'`@$><=;|&{(
static private String[] delimiters = {" ", "\t", "\n", "\"", "\\", "'", "`", "@", "$", ">", "<", "=", ";", "|", "&", "{", "("};