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
When views are created on mruby strings it's possible that the string
pointer points to a longer string than is visible at the ruby level.
In other words strlen(s.pointer) >= s.length. By copying a string we
avoid this edge case.
In the UI this created a bug where it was impossible to delete
characters from a long string.
In ruby you'd start with a string like "foobar"\0(len 6), delete a
character off the end via creating a string view which at the ruby
level was "fooba", but under the hood it was represented via
"fooba"r\0(len 5).
This specific behavior only occurs for non-embeddable strings which in
mruby's case is about roughly 27 characters (compilation flag
dependent).
0 commit comments