diff options
author | Xavier Noria <fxn@hashref.com> | 2011-07-23 12:15:41 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-07-23 12:15:41 +0200 |
commit | ace3723d2fcb1a96d51c2c82050594129328d7c0 (patch) | |
tree | d95d16b7dfee13037987913ed71d1708b5484f15 /activesupport/lib/active_support/multibyte | |
parent | 94978b9a46173b875bcb0d5cb724e5119e4aa8f4 (diff) | |
parent | 38310ab1a6f559860e25b0e28bef9560bb452ae6 (diff) | |
download | rails-ace3723d2fcb1a96d51c2c82050594129328d7c0.tar.gz rails-ace3723d2fcb1a96d51c2c82050594129328d7c0.tar.bz2 rails-ace3723d2fcb1a96d51c2c82050594129328d7c0.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'activesupport/lib/active_support/multibyte')
-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 |