mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Fixing the first Ruby 1.9 problem with calling a block that has an arity of zero or one
Signed-off-by: Nick Quaranto <nick@quaran.to>
This commit is contained in:
parent
b92412a782
commit
e8ce6b9f26
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ class Factory
|
|||
end
|
||||
|
||||
def add_to(proxy)
|
||||
value = @block.call(proxy)
|
||||
value = @block.arity.zero? ? @block.call : @block.call(proxy)
|
||||
if Factory::Sequence === value
|
||||
raise SequenceAbuseError
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue