Skip to content

Commit

Permalink
Merge pull request #5079 from nomadium/add-method-eqq
Browse files Browse the repository at this point in the history
Add Method#=== that invokes #call
  • Loading branch information
kares committed Mar 20, 2018
2 parents d69dc09 + d54139a commit 804fe00
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/java/org/jruby/RubyMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ public RubyBoolean op_equal(ThreadContext context, IRubyObject other) {
return context.runtime.newBoolean( equals(other) );
}

@Override
@JRubyMethod(name = "===", required = 1)
public IRubyObject op_eqq(ThreadContext context, IRubyObject other) {
return method.call(context, receiver, implementationModule, methodName, other, Block.NULL_BLOCK);
}

@Override
public boolean equals(Object other) {
if (!(other instanceof RubyMethod)) {
Expand Down

0 comments on commit 804fe00

Please sign in to comment.