string.rb: `upto` to break when the string length is longer than `end`.
MODIFY
mrbgems/mruby-string-ext/mrblib/string.rb
mrbgems/mruby-string-ext/mrblib/string.rb
@@ -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

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