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

documentation fix: wrong result

This commit is contained in:
Akira Matsuda 2011-07-13 18:27:14 +09:00
parent 5dcebd7e38
commit c7359e3267

View file

@ -331,8 +331,7 @@ module ActiveSupport #:nodoc:
# when the storage for a string is limited for some reason.
#
# Example:
# s = 'こんにちは'
# s.mb_chars.limit(7) # => "こに"
# 'こんにちは'.mb_chars.limit(7).to_s # => "こん"
def limit(limit)
slice(0...translate_offset(limit))
end