Commit 3efbea3f authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

wrong check of argument numbers

parent 17278e8c
......@@ -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)}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment