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

Commits on Mar 14, 2015

  1. 3
    Copy the full SHA
    ffb5b80 View commit details
  2. Copy the full SHA
    ba3219a View commit details
  3. Copy the full SHA
    1d72dee View commit details
Original file line number Diff line number Diff line change
@@ -13,3 +13,4 @@ fails:StringIO#puts when passed 1 or more objects prints a newline when passed n
fails:StringIO#puts when passed no arguments returns nil
fails:StringIO#puts when passed no arguments prints a newline
fails:StringIO#puts when passed no arguments does not honor the global output record separator $\
fails:StringIO#puts when passed 1 or more objects does not put a \n after each Objects that end in a newline

This file was deleted.

Original file line number Diff line number Diff line change
@@ -85,9 +85,12 @@ public Object execute(VirtualFrame frame) {
// scenario is that the argument at that position is an UndefinedPlaceholder, which doesn't take up
// a space in the frame.
if (taintFromParameters[i] < RubyArguments.getUserArgumentsCount(frame.getArguments())) {
final RubyBasicObject taintSource =
(RubyBasicObject) RubyArguments.getUserArgument(frame.getArguments(), taintFromParameters[i]);
maybeTaint(taintSource, result);
final Object argument = RubyArguments.getUserArgument(frame.getArguments(), taintFromParameters[i]);

if (argument instanceof RubyBasicObject) {
final RubyBasicObject taintSource = (RubyBasicObject) argument;
maybeTaint(taintSource, result);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -231,8 +231,16 @@ public ConcatNode(ConcatNode prev) {
super(prev);
}

@CreateCast("other") public RubyNode coerceOtherToString(RubyNode other) {
return ToStrNodeFactory.create(getContext(), getSourceSection(), other);
@Specialization
public RubyString concat(RubyString string, int other) {
string.getByteList().append((byte) other);
return string;
}

@Specialization
public RubyString concat(RubyString string, long other) {
string.getByteList().append((byte) other);
return string;
}

@TruffleBoundary
@@ -259,6 +267,12 @@ public RubyString concat(RubyString string, RubyString other) {

return string;
}

@Specialization(guards = {"!isInteger(other)", "!isLong(other)", "!isRubyString(other)"})
public Object concat(VirtualFrame frame, RubyString string, Object other) {
notDesignedForCompilation();
return ruby(frame, "concat StringValue(other)", "other", other);
}
}

@CoreMethod(names = "%", required = 1, argumentsAsArray = true)