Permalink
Browse files

Method calls with expanded arrays require parentheses

This fixes the following warning:

    lib/rspec/mocks/message_expectation.rb:43: warning: `*' interpreted
    as argument prefix

- Closes #30.
  • Loading branch information...
1 parent be136a4 commit 46e8577850d0f69978d0f47ea4e45f4bffc9d78b @gioele gioele committed with dchelimsky Nov 21, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rspec/mocks/message_expectation.rb
@@ -40,7 +40,7 @@ def build_child(expected_from, method_block, expected_received_count, opts={})
new_gen = error_generator.clone
new_gen.opts = opts
child.error_generator = new_gen
- child.clone_args_to_yield *@args_to_yield
+ child.clone_args_to_yield(*@args_to_yield)
child
end

0 comments on commit 46e8577

Please sign in to comment.