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: # Example:
# 'क्षि'.mb_chars.length # => 4 # 'क्षि'.mb_chars.length # => 4
# 'क्षि'.mb_chars.g_length # => 3 # 'क्षि'.mb_chars.grapheme_length # => 3
def g_length def grapheme_length
Unicode.unpack_graphemes(@wrapped_string).length Unicode.unpack_graphemes(@wrapped_string).length
end end

View file

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