-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
On updating a project to Ruby 3.0, I got a number of errors from InstanceMethodWrapper#wrap_method, and I think it is not properly handling keyword arguments, I think it should be something like:
def wrap_method(original_method)
original_class = klass
klass.send(:define_method, original_method.name) do |*args, **kwargs, &block|
begin
DeadCodeDetector::InstanceMethodWrapper.unwrap_method(original_class, original_method)
rescue StandardError => e
if DeadCodeDetector.config.error_handler
DeadCodeDetector.config.error_handler.call(e)
end
end
method_bound_to_caller = original_method.bind(self)
method_bound_to_caller.call(*args, **kwargs, &block)
end
endcorsonknowles
Metadata
Metadata
Assignees
Labels
No labels