From 2ced56e6137c220a1d302f70cee4640d37f8dab4 Mon Sep 17 00:00:00 2001 From: Matthieu Paret Date: Mon, 27 Jan 2014 17:31:02 +0100 Subject: [PATCH] arity == 0 to check there is no argument --- lib/apipie/validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apipie/validator.rb b/lib/apipie/validator.rb index 43c043813..3cc3ecc3f 100644 --- a/lib/apipie/validator.rb +++ b/lib/apipie/validator.rb @@ -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