# File lib/backports/1.8.7/string/upto.rb, line 6
    def upto_with_exclusive(to, excl=false)
      return upto_without_exclusive(to){|s| yield s} if block_given? && !excl
      r = Range.new(self, to, excl)
      return r.to_enum unless block_given?
      r.each{|s| yield s}
      self
    end