Skip to content

Commit

Permalink
Merge pull request #260 from craiglittle/throw-args-ambiguity
Browse files Browse the repository at this point in the history
Remove throw arguments ambiguity
  • Loading branch information
myronmarston committed Apr 2, 2013
2 parents f78d99e + 1453393 commit f7bbe2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/mocks/message_expectation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def and_raise(exception = RuntimeError, message = nil)
# car.stub(:go).and_throw(:out_of_gas)
# car.stub(:go).and_throw(:out_of_gas, :level => 0.1)
def and_throw(*args)
@implementation = Proc.new { throw *args }
@implementation = Proc.new { throw(*args) }
end

# Tells the object to yield one or more args to a block when the message
Expand Down

0 comments on commit f7bbe2e

Please sign in to comment.