File tree Expand file tree Collapse file tree 3 files changed +1
-5
lines changed
activesupport/lib/active_support Expand file tree Collapse file tree 3 files changed +1
-5
lines changed Original file line number Diff line number Diff line change 1
- require 'active_support/multibyte'
2
-
3
1
class String
4
2
# If you pass a single Fixnum, returns a substring of one character at that
5
3
# position. The first character of the string is at position 0, the next at
Original file line number Diff line number Diff line change 1
- require 'active_support/core_ext/string/multibyte'
2
-
3
1
class String
4
2
# Returns the string, first removing all whitespace on both ends of
5
3
# the string, and then changing remaining consecutive whitespace
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ def self.consumes?(string)
76
76
#
77
77
# 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"]
78
78
def split ( *args )
79
- @wrapped_string . split ( *args ) . map { |i | i . mb_chars }
79
+ @wrapped_string . split ( *args ) . map { |i | self . class . new ( i ) }
80
80
end
81
81
82
82
# Works like like <tt>String#slice!</tt>, but returns an instance of Chars, or nil if the string was not
You can’t perform that action at this time.
0 commit comments