Permalink
Browse files

documentation fix: wrong result

  • Loading branch information...
amatsuda committed Jul 13, 2011
1 parent 5dcebd7 commit c7359e3267fd0a40da59152871a0a05307e98b3a
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 c7359e3

Please sign in to comment.