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