5 # rng.first(n) -> an_array
7 # Returns the first object in the range, or an array of the first +n+
10 # (10..20).first #=> 10
11 # (10..20).first(3) #=> [10, 11, 12]
14 return self.begin if args.empty?
16 raise ArgumentError, "wrong number of arguments (given #{args.length}, expected 1)" unless args.length == 1
19 raise ArgumentError, "negative array size (or size too big)" unless 0 <= n