lib/hightop/enumerable.rb in hightop-0.3.0 vs lib/hightop/enumerable.rb in hightop-0.4.0
- old
+ new
@@ -1,8 +1,8 @@
module Enumerable
def top(*args, **options, &block)
if block || !(respond_to?(:scoping) || respond_to?(:with_scope))
- raise ArgumentError, "wrong number of arguments (given 2, expected 0..1)" if args.size > 1
+ raise ArgumentError, "wrong number of arguments (given #{args.size}, expected 0..1)" if args.size > 1
limit = args[0]
min = options[:min]
counts = Hash.new(0)