class Range def each(options = {}, &block) val = self.begin while val < self.end yield val val = val.succ end yield self.end if self.end == val || options[:always_include_last] end end
You need to create an account or log in to post comments to this site.