From 3efbea3fab1fedf1f6b783204fd226653e908f6e Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Fri, 19 Oct 2012 21:44:58 +0900 Subject: wrong check of argument numbers --- mrblib/enum.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrblib/enum.rb b/mrblib/enum.rb index 29422716c..2774bc856 100644 --- a/mrblib/enum.rb +++ b/mrblib/enum.rb @@ -199,7 +199,7 @@ module Enumerable # # ISO 15.3.2.2.11 def inject(*args, &block) - raise ArgumentError, "too many arguments" if args.size > 3 + raise ArgumentError, "too many arguments" if args.size > 2 if Symbol === args[-1] sym = args[-1] block = ->(x,y){x.send(sym,y)} -- cgit v1.2.3