From c7359e3267fd0a40da59152871a0a05307e98b3a Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 13 Jul 2011 18:27:14 +0900 Subject: documentation fix: wrong result --- activesupport/lib/active_support/multibyte/chars.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/multibyte/chars.rb') 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 -- cgit v1.2.3