Skip to content

Commit

Permalink
Showing 2 changed files with 6 additions and 2 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1745,7 +1745,12 @@ private void removeMethod(VirtualFrame frame, DynamicObject module, String name)

if (Layouts.MODULE.getFields(module).getMethod(name) != null) {
Layouts.MODULE.getFields(module).removeMethod(name);
methodRemovedNode.call(frame, module, "method_removed", getSymbol(name));
if(Layouts.CLASS.isClass(module) && Layouts.CLASS.getIsSingleton(module)){
final DynamicObject receiver = Layouts.CLASS.getAttached(module);
methodRemovedNode.call(frame, receiver, "singleton_method_removed", getSymbol(name));
} else {
methodRemovedNode.call(frame, module, "method_removed", getSymbol(name));
}
} else {
errorProfile.enter();
throw new RaiseException(coreExceptions().nameErrorMethodNotDefinedIn(module, name, this));

0 comments on commit edb207a

Please sign in to comment.