Skip to content

Commit

Permalink
[Truffle] BasicObject#== is the same as BasicObject#equal?.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Oct 31, 2014
1 parent 1896640 commit 9ba6b5a
Showing 1 changed file with 1 addition and 19 deletions.
Expand Up @@ -43,24 +43,6 @@ public boolean not() {

}

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

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

public EqualNode(EqualNode prev) {
super(prev);
}

@Specialization
public boolean equal(Object a, Object b) {
return a == b;
}

}

@CoreMethod(names = "!=", required = 1)
public abstract static class NotEqualNode extends CoreMethodNode {

Expand Down Expand Up @@ -99,7 +81,7 @@ public long id(RubyBasicObject object) {

}

@CoreMethod(names = "equal?", required = 1)
@CoreMethod(names = {"equal?", "=="}, required = 1)
public abstract static class ReferenceEqualNode extends CoreMethodNode {

public ReferenceEqualNode(RubyContext context, SourceSection sourceSection) {
Expand Down

0 comments on commit 9ba6b5a

Please sign in to comment.