fix the plus method that sneaked into arm

This commit is contained in:
Torsten Ruger
2015-08-06 18:55:08 +03:00
parent 9ebe6eb5b7
commit 4afd7f78ca
3 changed files with 11 additions and 3 deletions

View File

@ -48,8 +48,14 @@ module Parfait
method
end
def remove_instance_method method
self.instance_methods.delete method
def remove_instance_method method_name
found = get_instance_method( method_name )
if found
self.instance_methods.delete(found)
else
raise "No such method #{method_name} in #{self.name}"
end
self.instance_methods.delete found
end
def create_instance_method method_name , arg_names