diff options
author | Xavier Noria <fxn@hashref.com> | 2010-07-30 02:30:04 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-07-30 02:30:04 +0200 |
commit | 755af497555fde16db86f7e51f6462b0aca79b49 (patch) | |
tree | 9280835167f7ea7422df010f67c65c729dd26de1 /activesupport/lib/active_support/multibyte/unicode.rb | |
parent | a7a6a2ff46b173b420bd493d727772531d72658f (diff) | |
download | rails-755af497555fde16db86f7e51f6462b0aca79b49.tar.gz rails-755af497555fde16db86f7e51f6462b0aca79b49.tar.bz2 rails-755af497555fde16db86f7e51f6462b0aca79b49.zip |
edit pass to apply API guideline wrt the use of "# =>" in example code
Diffstat (limited to 'activesupport/lib/active_support/multibyte/unicode.rb')
-rw-r--r-- | activesupport/lib/active_support/multibyte/unicode.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/multibyte/unicode.rb b/activesupport/lib/active_support/multibyte/unicode.rb index 3d80f5fa58..1139783b65 100644 --- a/activesupport/lib/active_support/multibyte/unicode.rb +++ b/activesupport/lib/active_support/multibyte/unicode.rb @@ -64,7 +64,7 @@ module ActiveSupport # valid UTF-8. # # Example: - # Unicode.u_unpack('Café') #=> [67, 97, 102, 233] + # Unicode.u_unpack('Café') # => [67, 97, 102, 233] def u_unpack(string) begin string.unpack 'U*' @@ -85,8 +85,8 @@ module ActiveSupport # Unpack the string at grapheme boundaries. Returns a list of character lists. # # Example: - # Unicode.g_unpack('क्षि') #=> [[2325, 2381], [2359], [2367]] - # Unicode.g_unpack('Café') #=> [[67], [97], [102], [233]] + # Unicode.g_unpack('क्षि') # => [[2325, 2381], [2359], [2367]] + # Unicode.g_unpack('Café') # => [[67], [97], [102], [233]] def g_unpack(string) codepoints = u_unpack(string) unpacked = [] @@ -120,7 +120,7 @@ module ActiveSupport # Reverse operation of g_unpack. # # Example: - # Unicode.g_pack(Unicode.g_unpack('क्षि')) #=> 'क्षि' + # Unicode.g_pack(Unicode.g_unpack('क्षि')) # => 'क्षि' def g_pack(unpacked) (unpacked.flatten).pack('U*') end |