Skip to content

Commit

Permalink
documentation fix: wrong result
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda authored and fxn committed Jul 23, 2011
1 parent 2a4e204 commit 48a013d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions activesupport/lib/active_support/multibyte/chars.rb
Expand Up @@ -331,8 +331,7 @@ def slice(*args)
# 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
Expand Down

0 comments on commit 48a013d

Please sign in to comment.