Skip to content
Permalink
Browse files
[Truffle] BasicObject#== is the same as BasicObject#equal?.
  • Loading branch information
eregon committed Oct 31, 2014
1 parent 1896640 commit 9ba6b5ae9ac4cc1b4cd36110c862bed8524b1756
Showing 1 changed file with 1 addition and 19 deletions.
@@ -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 {

@@ -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) {

0 comments on commit 9ba6b5a

Please sign in to comment.