Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Truffle] Module#define_method with an UnboundMethod.
  • Loading branch information
chrisseaton committed Apr 4, 2015
1 parent 49dc6b4 commit c6599ea
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -971,6 +971,15 @@ public RubySymbol defineMethod(RubyModule module, String name, RubyMethod method
return getContext().getSymbolTable().getSymbol(name);
}

@Specialization
public RubySymbol defineMethod(RubyModule module, String name, RubyUnboundMethod method, UndefinedPlaceholder block) {
notDesignedForCompilation();

module.addMethod(this, method.getMethod().withNewName(name));

return getContext().getSymbolTable().getSymbol(name);
}

private RubySymbol defineMethod(RubyModule module, String name, RubyProc proc) {
notDesignedForCompilation();

Expand Down

0 comments on commit c6599ea

Please sign in to comment.