I defined a Statespace class, which happens to encode states as integers
in a range 0...nstates.
I want to provide an iterator like

def each
  nstates.times { |i| yield i }
end

or i could write it as

def each(&b)
  nstates.times(&b)
end

Which is the better or more Ruby-esque way?
Any difference in efficiency?

regards,
-John