Skip to content

Commit

Permalink
BUGFIX for calling "to procable" filters in hooks
Browse files Browse the repository at this point in the history
eg. VCR.configure.after_http_request(:stubbed?)
  • Loading branch information
playupchris committed May 1, 2012
1 parent 9e2d24e commit db7f0bc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/vcr/util/variable_args_block_caller.rb
Expand Up @@ -2,11 +2,8 @@ module VCR
# @private
module VariableArgsBlockCaller
def call_block(block, *args)
if block.arity >= 0
args = args.first([args.size, block.arity].min)
end

block.call(*args)
first_n_args = block.arity == -1 ? 1 : [args.size, block.arity].min
block.call(*args.first(first_n_args))
end
end
end
Expand Down

0 comments on commit db7f0bc

Please sign in to comment.