lib/httpx/callbacks.rb in httpx-0.15.4 vs lib/httpx/callbacks.rb in httpx-0.16.0
- old
+ new
@@ -17,10 +17,10 @@
callbacks(type).clear
on(type, &block)
end
def emit(type, *args)
- callbacks(type).delete_if { |pr| :delete == pr[*args] } # rubocop:disable Style/YodaCondition
+ callbacks(type).delete_if { |pr| :delete == pr.call(*args) } # rubocop:disable Style/YodaCondition
end
protected
def callbacks_for?(type)