lib/rubocop/cop/rspec/around_block.rb in rubocop-rspec-3.2.0 vs lib/rubocop/cop/rspec/around_block.rb in rubocop-rspec-3.3.0
- old
+ new
@@ -67,18 +67,16 @@
def add_no_arg_offense(node)
add_offense(node, message: MSG_NO_ARG)
end
def check_for_unused_proxy(block, proxy)
- name, = *proxy
-
find_arg_usage(block) do |usage|
- return if usage.include?(s(:lvar, name))
+ return if usage.include?(s(:lvar, proxy.name))
end
add_offense(
proxy,
- message: format(MSG_UNUSED_ARG, arg: name)
+ message: format(MSG_UNUSED_ARG, arg: proxy.name)
)
end
def check_for_numblock(block)
find_arg_usage(block) do |usage|