diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index 8cd3cfe455bf072d7c4fdaf02401f8e0869493e4..ba2ada2c1ae88f10083ca521d274613917b83819 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -80,6 +80,8 @@ def split(*args) @wrapped_string.split(*args).map { |i| i.mb_chars } end + # Works like like String#slice!, but returns an instance of Chars, or nil if the string was not + # modified. def slice!(*args) chars(@wrapped_string.slice!(*args)) end