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

Commits on Jun 1, 2015

  1. Copy the full SHA
    b0c7a4b View commit details
  2. Copy the full SHA
    3d202ba View commit details
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/matchdata/post_match_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
import com.oracle.truffle.api.utilities.ConditionProfile;
import org.joni.exception.ValueException;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.cast.TaintResultNode;
import org.jruby.truffle.nodes.coerce.ToIntNode;
import org.jruby.truffle.nodes.coerce.ToIntNodeGen;
import org.jruby.truffle.nodes.core.array.ArrayNodes;
@@ -220,13 +221,16 @@ public RubyBasicObject preMatch(RubyMatchData matchData) {
@CoreMethod(names = "post_match")
public abstract static class PostMatchNode extends CoreMethodArrayArgumentsNode {

@Child private TaintResultNode taintResultNode;

public PostMatchNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
taintResultNode = new TaintResultNode(getContext(), getSourceSection());
}

@Specialization
public RubyBasicObject postMatch(RubyMatchData matchData) {
return matchData.getPost();
public Object postMatch(RubyMatchData matchData) {
return taintResultNode.maybeTaint(matchData.getSource(), matchData.getPost());
}

}
Original file line number Diff line number Diff line change
@@ -40,16 +40,6 @@ public RubyMatchData(RubyClass rubyClass, RubyBasicObject source, RubyRegexp reg
this.global = global;
}

public Object[] valuesAt(int... indices) {
final Object[] result = new Object[indices.length];

for (int n = 0; n < indices.length; n++) {
result[n] = values[indices[n]];
}

return result;
}

public Object[] getValues() {
return Arrays.copyOf(values, values.length);
}