Skip to content

Commit

Permalink
Fixing the first Ruby 1.9 problem with calling a block that has an ar…
Browse files Browse the repository at this point in the history
…ity of zero or one

Signed-off-by: Nick Quaranto <nick@quaran.to>
  • Loading branch information
jasonm authored and qrush committed Jun 17, 2009
1 parent b92412a commit e8ce6b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/factory_girl/attribute/dynamic.rb
Expand Up @@ -8,7 +8,7 @@ def initialize(name, block)
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
Expand Down

0 comments on commit e8ce6b9

Please sign in to comment.