You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[snip]
8: from /usr/local/bundle/gems/strings-0.2.1/lib/strings.rb:109:in `wrap'
7: from /usr/local/bundle/gems/strings-0.2.1/lib/strings/wrap.rb:29:in `wrap'
6: from /usr/local/bundle/gems/strings-0.2.1/lib/strings/wrap.rb:29:in `map'
5: from /usr/local/bundle/gems/strings-0.2.1/lib/strings/wrap.rb:30:in `block in wrap'
4: from /usr/local/bundle/gems/strings-0.2.1/lib/strings/wrap.rb:111:in `format_line'
3: from /usr/local/bundle/gems/strings-0.2.1/lib/strings/wrap.rb:142:in `insert_ansi'
2: from /usr/local/bundle/gems/strings-0.2.1/lib/strings/wrap.rb:142:in `reverse_each'
1: from /usr/local/bundle/gems/strings-0.2.1/lib/strings/wrap.rb:158:in `block in insert_ansi'
/usr/local/bundle/gems/strings-0.2.1/lib/strings/wrap.rb:158:in `insert': index 56 out of string (IndexError)
Looking at the code and at the skipped test cases, it seems that a lot of the complexity comes from trying to re-apply the "stack" of ANSI codes on following lines.
Considering that ANSI codes normally survive to the next line, is this really necessary in the first place? What prompted this feature?
Describe the problem
Strings.wrap
throws anIndexError
.Steps to reproduce the problem
Actual behaviour
Expected behaviour
What did you expect to happen?
Describe your environment
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
0.2.1
The text was updated successfully, but these errors were encountered: