lib/dato/repo.rb in dato-0.6.0 vs lib/dato/repo.rb in dato-0.6.1
- old
+ new
@@ -24,10 +24,10 @@
self.define_singleton_method(method_name) do |*args|
min_arguments_count = [
link.href.scan(IDENTITY_REGEXP).size,
link.schema && link.method != :get ? 1 : 0
- ].sum
+ ].reduce(0, :+)
args.size >= min_arguments_count or
raise ArgumentError.new(
"wrong number of arguments (given #{args.size}, expected #{min_arguments_count})"
)