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

Commits on Jun 1, 2015

  1. Copy the full SHA
    fc5340e View commit details
  2. Copy the full SHA
    32ac97e View commit details
Showing with 0 additions and 34 deletions.
  1. +0 −2 spec/truffle/tags/core/regexp/equal_value_tags.txt
  2. +0 −32 truffle/src/main/java/org/jruby/truffle/nodes/core/RegexpNodes.java
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/regexp/equal_value_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -29,45 +29,13 @@
import org.jruby.util.ByteList;
import org.jruby.util.RegexpOptions;

import java.util.ArrayList;
import java.util.Iterator;

import static org.jruby.util.StringSupport.CR_7BIT;

@CoreClass(name = "Regexp")
public abstract class RegexpNodes {

@CoreMethod(names = "==", required = 1)
public abstract static class EqualNode extends CoreMethodArrayArgumentsNode {

public EqualNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

@Specialization
public boolean equal(RubyRegexp a, RubyRegexp b) {
if (a == b) {
return true;
}

if (a.getRegex().getOptions() != b.getRegex().getOptions()) {
return false;
}

if (a.getSource().getEncoding() != b.getSource().getEncoding()) {
return false;
}

return a.getSource().equal(b.getSource());
}

@Specialization(guards = "!isRubyRegexp(b)")
public boolean equal(RubyRegexp a, Object b) {
return false;
}

}

public abstract static class EscapingNode extends CoreMethodArrayArgumentsNode {

@Child private EscapeNode escapeNode;