Skip to content

Commit

Permalink
Also traverse aliases for to dig up owner class. Fixes #5080
Browse files Browse the repository at this point in the history
headius committed Mar 15, 2018

Verified

This commit was signed with the committer’s verified signature.
headius Charles Oliver Nutter
1 parent 9cd2bae commit 2a1313c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/AbstractRubyMethod.java
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ public String getMethodName() {

@JRubyMethod(name = "owner")
public IRubyObject owner(ThreadContext context) {
return method.getDefinedClass();
return method.getRealMethod().getDefinedClass();
}

@JRubyMethod(name = "source_location")

0 comments on commit 2a1313c

Please sign in to comment.