1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use friendlier method name

This commit is contained in:
Norman Clarke 2012-01-05 17:25:40 -03:00
parent db6eb1930d
commit 16bee7618c
2 changed files with 3 additions and 3 deletions

View file

@ -168,8 +168,8 @@ module ActiveSupport #:nodoc:
#
# Example:
# 'क्षि'.mb_chars.length # => 4
# 'क्षि'.mb_chars.g_length # => 3
def g_length
# 'क्षि'.mb_chars.grapheme_length # => 3
def grapheme_length
Unicode.unpack_graphemes(@wrapped_string).length
end

View file

@ -595,7 +595,7 @@ class MultibyteCharsExtrasTest < Test::Unit::TestCase
else
str = input
end
assert_equal expected_length, chars(str).g_length
assert_equal expected_length, chars(str).grapheme_length
end
end