string.rb: upto to break when the string length is longer than end.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-06-29 16:49:16 +09:00
parent f09eb196da
commit b2b0329d29
@@ -457,6 +457,8 @@ class String
break if exclusive and n == 0
yield bs
break if n == 0
bsiz = bs.size
break if bsiz > max.size || bsiz == 0
bs = bs.succ
end
self