Permalink
Browse files

documentation fix: wrong result

  • Loading branch information...
1 parent 2a4e204 commit 48a013d6b71cb55b618cac3c4d04acf65d327c61 @amatsuda amatsuda committed with fxn Jul 13, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 activesupport/lib/active_support/multibyte/chars.rb
@@ -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

0 comments on commit 48a013d

Please sign in to comment.