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:
parent
5dcebd7e38
commit
c7359e3267
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue