diff options
author | Akira Matsuda <ronnie@dio.jp> | 2011-07-13 18:27:14 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2011-07-13 18:29:45 +0900 |
commit | c7359e3267fd0a40da59152871a0a05307e98b3a (patch) | |
tree | fc09892a18b1109bbd2e993c9bbe84abea1e8920 /activesupport/lib/active_support/multibyte/chars.rb | |
parent | 5dcebd7e3803c34b7e1aa1ed3577c9851dbee4a4 (diff) | |
download | rails-c7359e3267fd0a40da59152871a0a05307e98b3a.tar.gz rails-c7359e3267fd0a40da59152871a0a05307e98b3a.tar.bz2 rails-c7359e3267fd0a40da59152871a0a05307e98b3a.zip |
documentation fix: wrong result
Diffstat (limited to 'activesupport/lib/active_support/multibyte/chars.rb')
-rw-r--r-- | activesupport/lib/active_support/multibyte/chars.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index f9607f1aaf..b78d92f599 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -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 |