diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-05-25 12:29:00 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-25 12:29:00 +0100 |
commit | 98dc582742779081e71e697fcdf8d9ae2b421b16 (patch) | |
tree | f5680eef86e689a10d0f75434ba6a4e94829e439 /activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb | |
parent | 6277fd91133a3566333612857510d74de60d67f4 (diff) | |
download | rails-98dc582742779081e71e697fcdf8d9ae2b421b16.tar.gz rails-98dc582742779081e71e697fcdf8d9ae2b421b16.tar.bz2 rails-98dc582742779081e71e697fcdf8d9ae2b421b16.zip |
Merge docrails.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb')
-rw-r--r-- | activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb b/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb index 0166b69ac3..aa9c16f575 100644 --- a/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +++ b/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb @@ -147,13 +147,11 @@ module ActiveSupport::Multibyte::Handlers #:nodoc: # # s = "Müller" # s.chars[2] = "e" # Replace character with offset 2 - # s - # #=> "Müeler" + # s # => "Müeler" # # s = "Müller" # s.chars[1, 2] = "ö" # Replace 2 characters at character offset 1 - # s - # #=> "Möler" + # s # => "Möler" def []=(str, *args) replace_by = args.pop # Indexed replace with regular expressions already works @@ -183,10 +181,10 @@ module ActiveSupport::Multibyte::Handlers #:nodoc: # Example: # # "¾ cup".chars.rjust(8).to_s - # #=> " ¾ cup" + # # => " ¾ cup" # # "¾ cup".chars.rjust(8, " ").to_s # Use non-breaking whitespace - # #=> " ¾ cup" + # # => " ¾ cup" def rjust(str, integer, padstr=' ') justify(str, integer, :right, padstr) end @@ -196,10 +194,10 @@ module ActiveSupport::Multibyte::Handlers #:nodoc: # Example: # # "¾ cup".chars.rjust(8).to_s - # #=> "¾ cup " + # # => "¾ cup " # # "¾ cup".chars.rjust(8, " ").to_s # Use non-breaking whitespace - # #=> "¾ cup " + # # => "¾ cup " def ljust(str, integer, padstr=' ') justify(str, integer, :left, padstr) end @@ -209,10 +207,10 @@ module ActiveSupport::Multibyte::Handlers #:nodoc: # Example: # # "¾ cup".chars.center(8).to_s - # #=> " ¾ cup " + # # => " ¾ cup " # # "¾ cup".chars.center(8, " ").to_s # Use non-breaking whitespace - # #=> " ¾ cup " + # # => " ¾ cup " def center(str, integer, padstr=' ') justify(str, integer, :center, padstr) end |