Skip to content

Commit

Permalink
arity == 0 to check there is no argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Paret committed Jan 27, 2014
1 parent 2df1e36 commit 2ced56e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/apipie/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def process_value(value)
end

def self.build(param_description, argument, options, block)
self.new(param_description, block, options[:param_group]) if block.is_a?(Proc) && block.arity <= 0 && argument == Array
self.new(param_description, block, options[:param_group]) if block.is_a?(Proc) && block.arity == 0 && argument == Array
end

def description
Expand Down

0 comments on commit 2ced56e

Please sign in to comment.